21,496
社区成员




stackseg segment stack
bBuffer byte 100 DUP(?)
stackseg ends
extraseg segment
eBuffer BYTE "LOVE"
szMsg1 BYTE "YOU"
extraseg ends
dataseg segment
szMsg BYTE 'Hello World!',13,10,'$'
dataseg ends
codeseg segment
assume cs:codeseg, ds:dataseg, es:extraseg, ss:stackseg
START:
mov ax, dataseg
mov ds, ax
mov ax, extraseg
mov es, ax
movs szMsg1, szMsg
push ds
mov ax, es
mov ds, ax
lea dx, eBuffer
mov ah, 9
int 21h
pop ds
;暂停,任意键关闭
mov ah,1
int 21h
mov ah,4ch ;结束,可以修改al设置返回码
int 21h
codeseg ends
END START
szMsg1
原来的内容应该被覆盖了,显示为:LOVEHello World!;