DATA SEGMENT
NUM1 DB 15h; First number
NUM2 DB 20h; Second number
RESULT DB? ; Put sum here
CARRY DB? ; Put any carry here
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE, DS:DATA
START:MOV AX, DATA; Initialise data segment
MOV DS, AX; register using AX
MOV AL, NUM1; Bring the first number in AL
ADD AL, NUM2; Add the 2nd
Number to AL
MOV RESULT, AL; Store the result
RCL AL, 01; rotate carry into Least Significant Bit (LSB)
AND AL, 00000001B; Mask out all but LSB
MOV CARRY, AL; Store the carry
MOV AX, 4C00h; Terminate to DOS
INT 21h
CODE ENDS
END START