Professional Documents
Culture Documents
Aim:
To perform the Code conversions from given values using 8086 processor by
MASM 611 assembler.
Tool Used:
a) Start
e) Extract the last number – Rotate right the number 4 times and do AND operation to it with
0F
f) Add the AX with 3030H or add 30H individually to AH and AL. g) End ii) BCD to Hexadecimal
conversion:
a) Start
c) Move the BCD value to AX register and perform AND operation with 0FH.
d) Move the value of AX to BX. And again, load the AX with the same BCD number.
g) Store the CX register with 0AH (10) value and multiply with AX.
j) End.
Program:
Procedure:
1. Mount c c:\masm611\
2. c:
3. bin
Register No.: 20BCE1734 Name: Mridul Jadon
4. edit file_name.asm
5. masm file_name.asm
6. link file_name.obj
7. debug file_name.exe
Sample Input:
conversion:
Output:
Hexadecimal conversion:
operation: AX = 5 During
operation: AX = 5
During Conversion: AX = 27
Snapshot of the Output:
Result:
Hence, we converted BCD to ASCII & HEX based on given data and verified
using MASM application using DOSBOX.