SCL - Assembly

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

FACULTY OF COMPUTER SCIENCE AND INFORMATION

TECHNOLOGY
UNIVERSITY PUTRA MALAYSIA

SCL

CSC3200
SECOND SEMESTER 2023/2024

1. Write the instructions in assembly language.

i. set AX to hexadecimal value of B800H.


ii. copy a value of AX to data segment beginning location 39.
iii. set CH to binary value 11011111b
iv. set BX to 15Eh

2. Show the result in the destination operand. Indicate if the instruction is invalid.
Assume that BYTE1 is defined as DB 05 and WORD3 is defined as DW 216.

a) MOV CX,25H
b) MOV CL,0
c) MOV AX, BYTE1
d) ADD DL, BYTE1
e) SUB CL, WORD3
f) ADD DH, 051CH

3. What is the value in the AX register and/or BL register after the following
sequence of instructions are executed?

MOV BL, 01110000B


ROR BL, 01
MOV CL, 03
ROR BL, CL
MOV AL, 0EH
DIV BL

AX= ___________________ BL= _______________


4. What is the value in the CX register after the sequence of the following
instructions are executed? Assume the initial value in the CX register is 0000H.

A DB 11110100B
B DB 00000111B

MOV CH, 00000000B


MOV CL, B
ADD A, CL
CMP CL, B
JE L10
MOV CL, A
L10: ADD A, B

5. How many times does the following LOOP instruction will be executed?

MOV CX, 9
L2:
SUB CX, 2
LOOP L2

6. What is the value in the AX register and/or BL register after the following
sequence of instructions are executed?

MOV BL, 01110000B


ROR BL, 01
MOV CL, 03
ROR BL, CL
MOV AL, 0EH
DIV BL

AX= ___________________ BL= _______________

You might also like