assume cs:code
code segment
start:
mov ax , 2000h
mov ds , ax
mov bx , 0
s:
mov cl , [bx]
mov ch , 0
inc cx //此处要将cx加1是因为loop指令会先将cx-1然后再判断cx是否为0
inc bx
loop s
ok:dec bx
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]
mov ch , 0
inc cx //此处要将cx加1是因为loop指令会先将cx-1然后再判断cx是否为0
inc bx
loop s
ok:dec bx
mov dx,bx
mov ax,4c00h
int 21h
code ends
end start