; Example usage of the imul instruction in amu 8086
; This program multiplies two 16-bit numbers (300 and 400) and stores the result in DX:AX registers

.MODEL SMALL
.STACK 100h

.DATA
multiplicand DW 300
multiplier DW 400

.CODE
MAIN PROC
    ; initialize the DATA segment
    mov ax, @data
    mov ds, ax

    ; load the multiplicand and multiplier into AX and CX registers, respectively
    mov ax, multiplicand
    mov cx, multiplier

    ; perform the multiplication using the imul instruction
    imul cx

    ; store the 32-bit product in DX:AX registers
    mov dx, ax
    mov ax, 0

    ; return to the operating system
    mov ah, 4Ch
    int 21h

MAIN ENDP

END MAIN

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: