push.asm 645 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. global _start
  2. section .data
  3. align 16
  4. myaddress:
  5. dd 0xdeadbeef
  6. %include "header.inc"
  7. ;; push r/m - push edx
  8. db 0xff
  9. db 0xf2
  10. ;; push r/m - push bx
  11. db 0x66
  12. db 0xff
  13. db 0xf3
  14. ;; push imm
  15. push 0xdeadbeef
  16. push WORD 0xd00d
  17. ;; push r/m - mem
  18. push DWORD [myaddress]
  19. lea eax, [myaddress]
  20. push WORD [eax]
  21. ;; push reg
  22. mov ecx, 0xcafe
  23. push cx
  24. push ecx
  25. xor eax, eax
  26. pop ax
  27. pop eax
  28. pop cx
  29. pop ecx
  30. pop dx
  31. pop ebx
  32. pop si
  33. pop di
  34. %include "footer.inc"