.model small
.data
num1 db 00000111B
num2 db 00001111B
ans db ?
v10 db 10
arr db 10 dup(?)
cntr db 0
.code
mov ax,@data
mov ds,ax
mov ax,0000
mov ah,num1
OR ah,num2
LEA SI,arr
mov ans,ah
mov ax,0000
mov al,ans
L1:
div v10
mov [SI],ah
mov ah,00
add cntr,1
INC SI
cmp al,00
ja L1
DEC SI
mov ah,00
mov cl,cntr
L2:
mov dh,00
mov bl,[SI]
mov ah,02
add bl,30h
mov dl,bl
int 21h
DEC SI
Loop L2
mov ax,4C00h
int 21h
end