mov_sreg.asm 382 B

123456789101112131415161718192021
  1. global _start
  2. section .data
  3. align 16
  4. mydword:
  5. dd 0
  6. %include "header.inc"
  7. ; 32-bit register move should set higher bits to zero
  8. mov eax, -1
  9. mov eax, ss
  10. and eax, 0xffff0000
  11. ; 32-bit memory move should preserver higher bits
  12. mov dword [mydword], 0xdeadbeef
  13. mov [mydword], ss
  14. mov ebx, [mydword]
  15. and ebx, 0xffff0000
  16. %include "footer.inc"