assume cs:codes
codes segment
cai: mov ax,2000H ;段地址
mov ds,ax
mov bx,1000H ;偏移地址
mov ax,[bx] ;将bx中的内容,即(2000:1000)=be,放到寄存器ax中
inc bx
inc bx
mov [bx],ax ;逻辑地址:2000+1002,所以把
inc bx
inc bx
mov [bx],ax ;2000+1004,ax是两个子节,即取两个字节的东西(be 00),放在了21003和21004
inc bx
mov [bx],al ;2000+1005,al是指一个字节。只取了低字节的be
inc bx
mov [bx],al ;2000+1006,t
mov ax,4c00H ;退出程序
int 21H
codes segment
cai: mov ax,2000H ;段地址
mov ds,ax
mov bx,1000H ;偏移地址
mov ax,[bx] ;将bx中的内容,即(2000:1000)=be,放到寄存器ax中
inc bx
inc bx
mov [bx],ax ;逻辑地址:2000+1002,所以把
inc bx
inc bx
mov [bx],ax ;2000+1004,ax是两个子节,即取两个字节的东西(be 00),放在了21003和21004
inc bx
mov [bx],al ;2000+1005,al是指一个字节。只取了低字节的be
inc bx
mov [bx],al ;2000+1006,t
mov ax,4c00H ;退出程序
int 21H
codes ends
end cai