26 PROGRAM TO DIVIDE TWO 8 BIT NUMBERS IN 8086 MICROPROCESSOR

Code:

; PROGRAM TO DIVIDE TWO 8 BIT NUMBERS
.MODEL SMALL
.DATA
    REM DB 0
    QUO DB 0
.CODE
    MOV AX , 26  ; Dividend is always AX and greater than divisor
    MOV BL , 5   ; Divisor

    DIV BL       ; Divide 26/5

    MOV QUO , AH ; Moving Quotient from AH to QUO variable
    MOV REM , AL ; Moving Quotient from AL to REM variable

    MOV AH , 4CH ; EXIT
    INT 21H
END


Output:  



Previous
Next Post »

2 Comments

Click here for Comments