|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
assume cs:code,ds:data
data segment
db 10 dup(0)
data ends
code segment
ho:mov ax,12666
mov bx,data
mov ds,bx
mov si,0
call dtoc
mov dh,8
mov dl,3
mov cl,2
call show_str
mov ax,4c00h
int 21h
show_str:
mov al,0a0h
dec dh
mul dh
mov bx,ax
mov al,2
mul dl
sub ax,2
add bx,ax
mov ax,0b800h
mov es,ax
mov di,0
mov ch,0
mov al,cl
show:
mov cl,[si]
jcxz yes
mov es:[bx+di],cl
mov es:[bx+di+1],al
inc si
add di,2
jmp short show
yes:ret
dtoc:
push si
mov bx,0
hodiv:
mov dx,0
mov cx,10
div cx
mov cx,ax
jcxz ok
add dx,30H
push dx
inc bx
jmp short hodiv
ok:
add dx,30H
push dx
inc bx
mov cx,bx
mov si,0
s:
pop ax
mov [si],al
inc si
loop s
over:
pop si
ret
code ends
end ho |
|