(1)阅读并运行下面输出hello world!的程序
assume cs:codesg, ss:stacksg, ds:datasg
datasg segment
str db 'hello world!$'
datasg ends
stacksg segment
db 32 dup (0)
stacksg ends
codesg segment
start: mov ax,datasg
mov ds,ax
mov ax, stacksg
mov ss, ax
mov sp, 20h
lea bx,str
output:mov dl, [bx]
cmp dl, '$'
je stop
mov ah, 02H
int 21h
inc bx
jmp output
stop: mov ax,4c00h
int 21h
codesg ends
end start
(2)编辑并运行下面同样功能的程序,观察其相同点和不同点
.8086
.MODEL small
.data
str db 'hello world!$'
.stack 20H
.code
start: mov ax,@data
mov ds,ax
lea bx,str
output:mov dl, [bx]
cmp dl, '$'
je stop
mov ah, 02H
int 21h
inc bx
jmp output
stop: mov ax,4c00h
int 21h
end start