Logo 
Search:

Assembly Language Forum

Ask Question   UnAnswered
Home » Forum » Assembly Language       RSS Feeds

sum and difference of 2 bcd numbers

  Asked By: Yeah    Date: Oct 22    Category: Assembly Language    Views: 2513
  

Hi guys.Can someone point me why this program doesnt display anything?It should display the sum and difference of two bcd numbers..Ive checked it many times and i just cant see the problem

.model small
.data
.code
data segment
opr1 dw 1924h
opr2 dw 1432h
sum dw 2 dup(0)
subt dw 2 dup(0)
data ends
code segment
assume cs:code, ds:data
start:
mov ax,data
mov ds,ax
mov ax,opr1
mov bx,opr2
add ax,bx
daa
mov sum,ax
jnc next
inc [sum+2]
next:
mov ax,opr1
sub ax,bx
das
mov subt,ax
int 3
code ends
end start

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on sum and difference of 2 bcd numbers Or get search suggestion and latest updates.




Tagged: