Category Archives: 8086 MASM

8086 MASM Assembly Program for Addition of Two 8-bit Numbers

This blog post will guide you through a MASM (Microsoft Macro Assembler) program that performs the addition of two 8-bit numbers. While this is a fundamental operation, it demonstrates crucial assembly programming concepts such as data handling, register usage, and memory storage. Let’s dive in!

Assembly Code

    .model small
    .data
    a db 09h
    b db 02h
    c dw ?
    
    .code
    main proc
        mov ax, @data
        mov ds, ax
        
        mov al, a
        mov bl, b
        add al, bl
        
        mov ah, 0
        mov c, ax
        
        int 3  ; Breakpoint interrupt
        
        mov ax, 4C00h  ; Exit program
        int 21h
    main endp
    
    end main
Continue reading 8086 MASM Assembly Program for Addition of Two 8-bit Numbers