In assembly language 8086 we use mnemonics in order to perform arithmetic operations like in MUL/IMUL subtraction.
So, Let's dive deep into what MUL and IMUL is ...
MUL:- It multiplies unsigned byte/word from source with unsigned byte/word in AL/AX register.
Operation:-
When source is BYTE then, AX← AL* unsigned 8-bit source
When source is BYTE then, DX: AX← AX* unsigned 16-bit source
IMUL:- It multiplies signed byte/word from source with signed byte/word in AL/AX register.
Operation:-
When source is BYTE then, AX← AL* signed 8-bit source
When source is BYTE then, DX: AX← AX* signed 16-bit source
Which flags get affected?
Ans- OF , CF, PF , AF, SF , ZF
8086 Assembly program to multiply two 8-bit BCD number
data segment
n1 db 30h
n2 db 03h
res db ?
data ends
code segment
start:
assume cs:code ds:data
mov ax,data
mov ds,ax
mov al,n1
mov bl,n1
mul al
aam
mov ah,4ch
int21h
code ends
end start
For many other Language Programs of microprocessor 8086, C++ , Data Structures and MSBTE diploma ,BCA,MCA,and engineering related concepts visit our BLOG
Block transfer(Simple Program)
Block Transfer(REVERSE ORDER)
Addition of 8-bit BCD8086 program
addition of 16-bit bcd program
Division of 32/16 bit program
Subtraction of 8-bit program
Subtraction of 8-bit BCD program
Subtraction of 16-bit program
Subtraction of 16-bit BCD program
String reverse 8086 program
block transfer using string
string concatenation
string length calculation
Block Transfer
Block reverse
Hex to ASCII program 8086
BCD to ASCII program 8086
ASCII to BCD program 8086
BCD to HEX
HEX to BCD
8086 program to divide 8 bit hexadecimal number
8086 Program for Addition of two 8 bit Hexadecimal numbers microprocessor
8086 program to add two 8 bit BCD numbers
Assembly Language Program to DIVISION two 32-bit / 16 –bit numbers 8086 (signed and unsigned)
No comments:
Post a Comment