You are on page 1of 7

Hashemite University

Faculty of Engineering and Technology


Computer Engineering Department
Lab Work Sheet
Experiment 1(Part#2)
Review of Assembly Instruction Set
STUDENT NAME: mustafa alkhatib, STUDENT ID: 1736183

Q1) Assemble and execute the following Program USING Debug System on Dosbox:

CLD
Mov SI,70
Mov wo[70],302F
Mov wo[72],5A40
Mov wo[74],6699
LODSB
Mov CL,AL
LODSB
Mov BL,AL
LODSB
RET

Check the following values after you run the program on debug:

BL = ……30……………
CL = ………2F…………
AL = ………40…………
SI = ………0073…….........
DS = ………073F…………

Add your screen shot here..


Q2) Write a program on debug to perform the following:

1- Load AX = 2244 , BX = 1177


2- Push AX, then push BX
3- Pop the value of AX into CX
4- Pop the value of BX into DS: [30].

MOV AX,2244
MOV BX,1177
PUSH AX
PUSH BX
POP wo[30]
POP CX

Add your screen shot here..


Q3) Write a program using LODS that performs the following steps:
• Load the contents of memory locations 99 & 9A in the AX register then save it in
CX.

CLD
MOV SI,99
LODSW
MOV CX,AX

• Load the contents of memory locations 87 & 88 in the AX register then save it in
BX.
CLD
MOV SI,87
LODSW
MOV BX,AX

Add your screen shot here..


A

B
Q4) Write a program using STOS that performs the following:

• Stores the Word ( 6663 ) in memory locations from ES:9A to ES:95


STD
MOV DI,99
MOV AX,6663
MOV CX,3
REP STOSW

• Stores the byte ( D9 ) in memory locations from ES:4 to ES:C


CLD
MOV DI,4
MOV AL,D9
MOV CX,9
REP STOSB

Add your screen shot here..

A
B

Q5) Write a program using MOVS to Move 11 bytes at memory location 0700:300 to
memory location 500:200

CLD
MOV AX,700
MOV DS,AX
MOV BX,500
MOV ES,BX
MOV SI,300
MOV DI,200
MOV CX,11
REP MOVSB
Add your screen shot here..

You might also like