mov dl,20
mov dh,0
mov cl,2
call show_str
add dh,1
pop cx
loop s
mov ax,4c00h
int 21h
dtoc: push ds
push bx
push cx
mov bx,data1
mov ds,bx
mov bx,15
s2: call divo
add cx,30h
mov ds:[bx],cx
mov cx,ax
jcxz ok2
mov cx,dx
jcxz ok2
dec bx
inc cx
loop s2
ok2:
pop cx
pop bx
pop ds
ret
divo: push bx
push di
mov bx,ax
mov ax,dx
mov dx,0
div cx
mov di,ax
mov ax,bx
div cx
mov cx,bx
mov dx,di
pop di
pop bx
ret
show_str: push ds
push ax
push si
push cx
push bp
push es
mov ax,0b800h
mov ds,ax
mov bp,0
mov ax,data1
mov es,ax
mov si,0
mov bl,cl
mov al,160
mul dh
mov bp,ax
mov al,2
mul dl
add bp,ax
s3: mov cl,es:[si]
mov ch,0
jcxz ok1
mov ds:[bp],cl
mov ds:[bp+1],bl
add bp,2
inc si
inc cx
loop s3
ok1: pop es
pop bp
pop cx
pop si
pop ax
pop ds
ret
code ends
end stert