Hi Everyone ; add1plus1.asm Assemble with MASM / TASM
; Generates a .COM file
org 100h ; .COM programs load at 0100h
mov ax, 1 ; AX = 1
add ax, 1 ; AX = 1 + 1 = 2
; ---------- print AX (0–9 only) ----------
add al, '0' ; convert 0–9 to ASCII digit
mov dl, al ; DL holds character to print
mov ah, 02h ; DOS print-character function
int 21h
; newline (carriage return + line feed)
mov dl, 0Dh
int 21h
mov dl, 0Ah
int 21h
; return to DOS
mov ah, 4Ch
int 21h
Screen will show "2" and the cursor on the next line.
Yes I sure love maths
Best Wishes AlwaysSarah BGlobal Moderator