Advertisement
Guest User

Untitled

a guest
Dec 18th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. %define opcode 0xAB50
  2.  
  3. start:
  4. push ds ; stack -> ds
  5. pop es ; es -> ds, stack is empty
  6. ; mov es, ds ;; this does not work
  7.  
  8. push ds
  9. pop ss ; ss -> ds
  10. ; moved es and ss to the arena
  11.  
  12. ; equal to this
  13. ; mov bx, ds
  14. ; mov es, bx
  15.  
  16. mov sp, ax
  17. mov di, ax
  18. add di, finish
  19. ;; di -> our end
  20. ;; sp -> our beginning
  21.  
  22. mov ax, opcode
  23. loop1:
  24. stosw
  25. ;; stosw does this:
  26. ;; mov [es:di], ax
  27. ;; add di, 2
  28. finish:
  29.  
  30. ;; this will write to the next two bytes the opcodes of :
  31. ;; push ax
  32. ;; stosw
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement