I'm started 30 hours ago on learning assembly and I'm trying to do a activity, I can run some of the code but I cannot print the sum of the two numbers, whats wrong with my code?
this is my current output
Enter First Number:
Enter Second Number:
but the some wont print
here is my code
.MODEL small
.STACK 100h
.DATA
operation db, 13, 10, "Addition $"
message1 db 13, 10, "Enter First Number: $"
message2 db 13, 10, "Enter second Number: $"
message3 db 13, 10, "Sum: $"
newline db 13, 10, "$"
nameinput label byte
maxnamelen db 50
curnamelen db ?
namefield db 50 dup(?)
.CODE
start:
mov ax, @data
mov ds,ax
mov ah,09h
mov dx, offset operation
int 21h
mov ah, 01h
int 21h
cmp al, '1'
je Addition
Addition:
mov ah, 09h
mov dx, offset message1
int 21h
mov ah, 01h
int 21h
mov ah, 09h
mov dx, offset newline
int 21h
mov ah, 09h
mov dx, offset message2
int 21h
mov ah, 01h
int 21h
add al, bl
mov ah, 09h
mov dx, offset newline
int 21h
mov ax, 4c00h
int 21h
END