;PROGRAM TO CONVERT BCD NUMBER TO BINARY NUMBER
data segment
bcd equ 4567h
result dw ?
data ends
code segment
assume cs:code, ds:data
start:
mov ax,data
mov ds,ax
mov bx,bcd
mov ax,0h
mov cx,0h
again0:
cmp bx,0h
jz endprg
mov al,bl
sub al,01h
das
mov bl,al
mov al,bh
sbb al,00h
das
mov bh,al
inc cx
jmp again0
endprg:
mov result,cx
int 3
code ends
end start
Subscribe to:
Post Comments (Atom)
Intolerance is the most socially acceptable form of egotism, for it permits us to assume superiority without personal boasting. See the link below for more info.
ReplyDelete#assume
www.ufgop.org