程序代码: .model tiny
.code
main proc far
start:
xor ax,ax
push ds
push ax
mov ax,0
mov ds,ax
xor si,si
mov word ptr ds:[0200h],0
mov byte ptr ds:[0202h],0
mov cx,99h
next:
mov di,0203h
cmp byte ptr[si],12h
je equal
ja greater
dec di
equal:
dec di
greater:
dec di
inc byte ptr[di]
inc si
loop next
ret
main endp
end start