Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %define opcode 0xAB50
- start:
- push ds ; stack -> ds
- pop es ; es -> ds, stack is empty
- ; mov es, ds ;; this does not work
- push ds
- pop ss ; ss -> ds
- ; moved es and ss to the arena
- ; equal to this
- ; mov bx, ds
- ; mov es, bx
- mov sp, ax
- mov di, ax
- add di, finish
- ;; di -> our end
- ;; sp -> our beginning
- mov ax, opcode
- loop1:
- stosw
- ;; stosw does this:
- ;; mov [es:di], ax
- ;; add di, 2
- finish:
- ;; this will write to the next two bytes the opcodes of :
- ;; push ax
- ;; stosw
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement