ABOUT PUSH INSTRUCTION RELATED In 8086, the main stack register is called stack pointer – SP. The stack segment register (SS) is usually used to store information about the memory segment that stores the call stack of currently executed program. SP points to current stack top. By default, the stack grows downward in memory, so …
Daily Archives: July 15, 2010
push instruction.. push %rbx
| push instruction | (gdb) disass Dump of assembler code for function _IO_default_uflow: 0x00007f7c1e9964d0 : mov 0xd8(%rdi),%rax => 0x00007f7c1e9964d7 : push %rbx 0x00007f7c1e9964d8 : mov %rdi,%rbx 0x00007f7c1e9964db : callq *0x20(%rax) 0x00007f7c1e9964de : cmp $0xffffffffffffffff,%eax 0x00007f7c1e9964e1 : je 0x7f7c1e9964f2 0x00007f7c1e9964e3 : mov 0x8(%rbx),%rdx 0x00007f7c1e9964e7 : movzbl (%rdx),%eax 0x00007f7c1e9964ea : add $0x1,%rdx 0x00007f7c1e9964ee : mov %rdx,0x8(%rbx) 0x00007f7c1e9964f2 …
pop instruction and stack…
| POP Instruction | source : Windows Debugger. MOV AX,1234H MOV BX,5678H PUSH AX PUSH BX POP AX POP BX The values: AX=5678h BX=1234h First the value 1234h was pushed after that the value 5678h was pushed to the stack. Acording to LIFO 5678h comes of first, so AX will pop that value and BX …