Lab-03-Memory Access in Assembly Language
Lab-03-Memory Access in Assembly Language
Class/Section Date
C 2/13/2025
Grading
Report Marks Viva Marks Total
Name Registration No.
(Max. 8) (Max. 7) (Max. 15)
Abrar butt 460297
Objective
The aim of this lab is to use some of the data transfer and manipulation instructions, and to use
some assembler operators.
Exercise 1: In the memory list shown, insert the values of the variables as declared below, in
hexadecimal format:
.data
Exercise 2: Without writing any code, write down the expected contents of the register after the
instruction is executed:
Exercise 3: In this exercise we will learn about and use some new procedures that can be called
to display register or memory contents.
A call to crlf adds carraige return followed by a linefeed, eg., call crlf.
Step1: Write code to get Byte No 2 of mbyte into AL and byte No 1 of mbyte into AH. Ensure
that the higher order bits of EAX are cleared. Display EAX to verify that the correct bytes are in
the locations specified. Use all four write procedures to see the various output formats, with a
call to crlf after each writexxx to make the output easy to read.
(Note Use the data given in Exercise No. 1)
Step2: Extend program to display the length and size of the string variable “greetings” in
decimal format, and then print the first string