;Aim - 8-bit addition register adddressing mode with carry
.8086
.model small
.data
num1 db 05h
num2 db 0eh
sum db ?
carry db ?
.code
start:
mov ax , @data
mov ds , ax
mov ax , 0000h
mov al, num1
mov bl , num2
add al , bl
mov dl , 00
adc dl , 00
mov carry , dl
mov ax , 4c00h
int 21h
end start
;Result
;DS:0001 05(NUM1)
;DS:0002 0E(NUM2)
;0005 01
;SUM 23
;CARRY 00
No comments:
Post a Comment