Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

ASM Question

Name: Anonymous 2011-03-09 1:33

A section from the ASM guide I'm reading:
"MOV  AX,51h
MOV  BX,4Fh
XCHG AX,BX
PUSH AX
MOV  AX,34h
POP  BX
PUSH BX
POP  AX
First AX is equal to 51h and BX to 4Fh, than the 2 get exchanged.  Now we got
AX = 4Fh and BX = 51h.  AX gets pushed on the stack, then set to 34h:
AX = 34h and BX = 51h.  BX gets poped, than pushed:
AX = 34h and BX = 4Fh.  Finally AX gets poped.  So the final result is:
AX = 4Fh and BX = 4Fh"


Can someone please explain why AX= 4Fh and not 34h?? That's the last value that was copied to it.

Name: Anonymous 2011-03-09 7:45

I, personally, hate it when I get poped.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List