Write a program that adds ten numbers and store the result in register AX,BX,CX,DX and DS
DATA SEGMENT
DATA ENDS
CODE SEGMENT
ASSUME DS:DATA,CS:CODE
START:
MOV AX,DATA
MOV DS,AX
MOV ES,AX
mov ax,10
add ax,2 ; ax = 10+2
MOV DS,AX ; move result to DS
mov ax,3
add ax,2 ; ax = 2+3
mov bx,4
add bx,8 ; bx = 4+8
mov cx,4
add cx,1 ; cx = 4+1
mov dx,8
add dx,4 ; dx = 8+4
mov ah, 4ch
int 21h
CODE ENDS
END START
Comments
Leave a comment