Sunday, April 1, 2012

finding the sum of two numbers using 8086 in assembly language

assume cs:code,ds:data
data segment
org 2000h
num1 dw 1234h
num2 dw 2345h
sum db 2d dup(0h)
carry db 1d dup(0h)
data ends
code segment
start:mov ax,data
mov ds,ax
mov ax,num1
mov bx,num2
add al,bl
daa
mov sum,al
mov al,ah
adc al,bh
daa
mov sum+1,al
mov bl,0h
adc bl,0h
mov carry,bl
mov ah,4ch
int 21h
code ends
end start


No comments:

Post a Comment

DC motor control with Pulse Width Modulation Part 1

DC Motor intro DC motor is a device which converts electrical energy into kinetic energy. It converts the DC power into movement. The typica...