Computer Organization and Assembly Languages: Instructions

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Computer Organization and Assembly Languages BSE-F-18-OC

Lab 01

Instructions:
 Work on this lab individually. Discussion is not allowed.
 Evaluation of tasks will be conducted in lab.
 Anyone caught being indulged in the act of plagiarism would be awarded an “F” grade in this
lab.

Objective:
The purpose of this lab is to familiarize you with the programming tool and to practice some
basic concepts.

How to use MASM in windows 64-bit:


1) Run the DOSBox.exe file and install it like any other software.

Now that you’ve installed DOSBox, you’ll be able to run any 16bit or 32bit DOS executable inside it.

2) Paste the ‘8086’ folder in c:\


8086 folder contains the files
masm.exe, tasm.exe, link.exe, bin2hex.exe, exe2bin.exe, td.exe, edit.com and debug.exe, ml.exe
3) Launch DOSBox and type the following commands:

mount c c:\8086
c:

Tazeem Haider
([email protected])
Computer Organization and Assembly Languages BSE-F-18-OC
Lab 01

Now you are in c:\8086 directory.

Note: make .asm programs in c:\8080 directory. For example “prog.asm” is already in this directory.

Now use the same commands you use for making, compiling, linking and debugging (edit, ml, masm,
link, debug).

https://www.youtube.com/watch?v=d6MeQSsgqrw

Commands

Masm prog.asm

Link prog.obj

Prog.exe

OR

Ml prog.asm

Prog.exe

- Practice Debug Commands on the code prog.asm.

Now, solve the following questions on pages labeled with your roll number and name:

Task 01:
Convert the following Binary and Hex numbers to Decimal:
a) 1110
b) FAE2Ch
Task 02:
Convert the following numbers:
a) 97 to Binary
b) 6120 to Hex
Task 03:
Convert the following numbers:
a) A2Ch to Binary
b) 10010101 10101110 to Hex
Task 04:
Perform the following additions:

Tazeem Haider
([email protected])
Computer Organization and Assembly Languages BSE-F-18-OC
Lab 01
a) 100101 + 10111
b) FEFHh + FBCADh
Task 05:
Perform the following subtractions:
a) 11011 – 10110
b) F001Eh – 1FF3Fh
Task 06:
Do the following subtractions by two’s complement addition:
a) 10110100 – 10010111
b) 1ABCh – B3EAh

Tazeem Haider
([email protected])

You might also like