assume cs:code
code segment
start: mov ax , 2000h
mov ds , ax
mov bx , 0
s:
mov cl , [bx] //用【bx】处内存的值直接赋值给cx寄存器,注意不能将cl写成cx,因为只赋值一个字节,不是一个字
mov ch , 0
jcxz ok
inc bx
jmp short s
ok:
mov dx , bx
mov ax , 4c00h
int 21h
code ends
end start
code segment
start: mov ax , 2000h
mov ds , ax
mov bx , 0
s:
mov cl , [bx] //用【bx】处内存的值直接赋值给cx寄存器,注意不能将cl写成cx,因为只赋值一个字节,不是一个字
mov ch , 0
jcxz ok
inc bx
jmp short s
ok:
mov dx , bx
mov ax , 4c00h
int 21h
code ends
end start