structjn.asm
来自「开放源码的编译器open watcom 1.6.0版的源代码」· 汇编 代码 · 共 32 行
ASM
32 行
.386
SEGMENTED=1
.model small
xreal10 struc
bytes1to4 dd 0
bytes5to8 dd 0
bytes9n10 dw 0
xreal10 ends
mov10 macro src_seg,src_off,dst_seg,dst_off
mov eax,src_seg:src_off.bytes1to4
mov dst_seg:dst_off.bytes1to4,eax
mov eax,src_seg:src_off.bytes5to8
mov dst_seg:dst_off.bytes5to8,eax
mov ax,src_seg:src_off.bytes9n10
mov dst_seg:dst_off.bytes9n10,ax
endm
.data
foo xreal10 <>
bar xreal10 <>
sam db 0,1,2,3,4,5,6,7,8,9
.code
mov10 es, foo, ds, bar
mov10 es, [ebx], ds, [ecx+2]
mov10 es, foo, ds, sam
;mov eax, ds:foo.bytes1to4
;mov ds:bar.bytes1to4, eax
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?