Language…
25 users online: 1UPdudes, Abstract, badummzi,  Blaagon, CharlieUltra, CroNo, dashlet, Dennsen86, DixyNL, GamesInTweed, GiraffeKiller, Hammerer, Inflagrandy, JezJitzu,  MarioFanGamer, Metal-Yoshi94, MorrieTheMagpie, mtheordinarygamer, Papangu, playagmes169, rafaelfutbal, Rykon-V73, Ryrir,  Segment1Zone2, TheOrangeToad - Guests: 293 - Bots: 475
Users: 64,795 (2,369 active)
Latest user: mathew

ASM question

What PEA command does in ASM?
This:

Code
PEA $8009

is the exact same as this:

Code
REP #$20
LDA #$8009
PHA

Now with extra girl and extra hacker
But what does it?
Originally posted by 65c816 Refrence
PEA: Push Effective Adress

PEA pushes a 16-bit address onto the stack. The stack pointer is decremented by 2. This instruction is quite misleading since it is the address that is pushed on the stack, not the value stored at that address.
Keep in mind that it's always a 16-bit value push regardless of A or X and Y being 16-bit or 8-bit. It's always a 16-bit value push. Some people seem to forget this.
My blog. I could post stuff now and then

My Assembly for the SNES tutorial (it's actually finished now!)
Oh, thanks guys. It's like a easy form to load A in 16 bits mode right?
PEA doesn't modify A. It only sticks a 16-bit value in the stack. But you could load it back into the A register by using a PLA XBA PLA I think (or only PLA when A = 16 bits).
My blog. I could post stuff now and then

My Assembly for the SNES tutorial (it's actually finished now!)