0% found this document useful (0 votes)
32 views11 pages

Microprocessor 2

This document summarizes a lab report on obtaining assembly code from hexadecimal characters and printing single and multiple ASCII characters. Key steps include using DosBox to run DebugX, clearing the screen, using commands like MOV, INT 21, and INT 20 to print characters A, B, and E from their hexadecimal values, and entering multiple characters directly into memory locations to print them. The conclusion is that single and multiple characters can be converted from hexadecimal to ASCII using assembly language commands.

Uploaded by

rudmila rudaba
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views11 pages

Microprocessor 2

This document summarizes a lab report on obtaining assembly code from hexadecimal characters and printing single and multiple ASCII characters. Key steps include using DosBox to run DebugX, clearing the screen, using commands like MOV, INT 21, and INT 20 to print characters A, B, and E from their hexadecimal values, and entering multiple characters directly into memory locations to print them. The conclusion is that single and multiple characters can be converted from hexadecimal to ASCII using assembly language commands.

Uploaded by

rudmila rudaba
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

CHITTAGONG INDEPENDENT UNIVERSITY (CIU)

SCHOOL OF SCIENCE AND ENGINEERING (SSE)


Computer Science and Engineering (CSE)

Course Title: Microprocessor and Interfacing Lab.


Course Code: CSE 311L

Name of the Report: To obtain assembly code from Hexadecimal character. Print Single and
multiple ASCI character

Report No: 02

Date of Submission: 28/10/2020

Prepared By –
Name: Zunayed Islam
ID: 18102012
Semester: Autumn-2020

Remarks:

Submitted To –
Mr. Atiqur Rahman
Assistant Professor
School of Science and Engineering (SSE)
Hexadecimal :
It is a base/positional number system used in mathematics and computer science.
It has a base of 16 and uses 16 unique alpha-numeric symbols with the numbers
zero to 9 to represent themselves and the letters A-F to represent the values 10
to 15.

Hexadecimal is an easier way to represent binary values in computer systems


because they significantly shorten the number of digits, as one hexadecimal digit
is equivalent to four binary digits.

Asci :
ASCII (American Standard Code for Information Interchange) is the most common
format for text files in computers and on the Internet. In an ASCII file, each
alphabetic, numeric, or special character is represented with a 7-bit binary
number (a string of seven 0s or 1s). 128 possible characters are defined.UNIX and
DOS-based operating systems use ASCII for text files.

Objective :
1. Covert Hexadecimal to Asci code.

Platform :
 DosBox.
Machine code :
(Z:\>mount d d:/debugx)

The command mount is given so that we can recognise the folder D, and then we

can access the directory of DebugX.

(Z:\>d)

This command is given for getting into the D drive.

(D:\>debugx) & (-q)

Command is given so we run debugx and afterwards quit from debugx.

(D:\>cls)

This command is given to make screen clear.


Printing Single Character :
Working :

 a 100 : It means to take an address.

 mov : It takes 3 bits in memory and means to put some value in any

registor.

 mov ah, 02 : This command assigns numerical value 2 decimal into the top

half of the ax register. 02 is taken for single input characters.

 mov dl, 41 : Inserting the character 41 into dl lower half of dx

 int 21 : After all the registors is set we call the interrupt to print the

character.

 int 20 : Characters End.


 r ip : The default addess given is 100. We an change the ip address and
giving it a new address.

 -r : It shows elements in the resistor.

 t(tracing) : It executes and runs the program.

 P(proceed) : int 20 and int 21 are complex commands,so to execute them

p is used.

 -G(go till) : Command G, execution begins at location where it is pointed to

by the IP registers, g is used to run a program.

 41 is a hexadecimal character which implies A in ASCI code.

 42 is the hexadecimal character which implies B.

 45 is the hexadecimal character which implies B.

 U 100 : Unassembled, it seperates Machine code and Assembly code in the

left and side.


Printing multiple characters :
Working :

 mov ah, 09 This command assigns numerical value 2 decimal into the top

half of the ax register. 09 is taken for single input characters.

 mov dx,200 : Inserting the character 200 into dx.


 int 21 : After all the registors is set we call the interrupt to print the

character

 int 20 : Characters End.

 -e 200(ENTER: ADDRESS LIST) : Used to enter data or instructions


(as machine code) directly into Memory locations
 r ip : The default addess given is 100. We an change the ip address and
giving it a new address.

 00.24 : By entering 00.24, it indicates that no more value cfan be taken.

Conclusion :

Single and multiple characters from hexadecimal code to ASCI can be achieved.

Certain commands are given to perform the tasks. All this tasks are performed by

Assembly language. Assembly codes are a easier way rather than machine code.

You might also like