100% found this document useful (1 vote)
354 views2 pages

Comorg TP Dacula

The document contains an assembly language program with instructions to perform arithmetic operations, logical operations, and bitwise rotations and shifts. It provides sample assembly code instructions and asks the reader to determine the resulting register values or provide the value of a register in binary or hexadecimal format. The program is divided into three parts testing different types of instructions: Part A tests arithmetic instructions, Part B tests logical instructions, and Part C tests rotate and shift instructions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
354 views2 pages

Comorg TP Dacula

The document contains an assembly language program with instructions to perform arithmetic operations, logical operations, and bitwise rotations and shifts. It provides sample assembly code instructions and asks the reader to determine the resulting register values or provide the value of a register in binary or hexadecimal format. The program is divided into three parts testing different types of instructions: Part A tests arithmetic instructions, Part B tests logical instructions, and Part C tests rotate and shift instructions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

JOHN ART DACULA

BSCPE701

Part A: Arithmetic Instructions


Determine the resulting values of AX, BX, and DX for each set of assembly codes.
Answer in hexadecimal format. (15 items x 2 points)

1. MOV AX, 1782h AX = 1782h BX


MOV BX, 1278h = 1278h DX =
ADD AX, BX 29FAh
RET

2. MOV AX, 1782h AX = 1782h BX


MOV BX, 1278h = 1278h DX =
SUB AX, BX 50Ah
RET

3. MOV AL, 82h AX = 82h BX


MOV BL, 81h = 81h DX =
MUL BX 4182h
RET

4. MOV AX, 57F2h AX = 57F2 BX


MOV BX, 1375h = 1375 DX =
DIV BX A1E
RET

5. MOV AX, 1782h AX = 1782


MOV BX, 1278h BX = 1278
MOV DH, 55h DX = 0
ADD AX, BX
MOV BX, 0278h
SUB AX, BX
RET

Part B: Logic Instructions


Answer the question for each set of assembly codes. Answer in hexadecimal format. (5
items x 2 points)

1. MOV AX, 614Bh What would be the value of AX after program execution?
MOV BX, 1251h AX = (0000000001000001)2 = (65)10 = (41h)
AND AX, BX
RET

2. MOV AX, 614Bh What would be the value of AX after program execution?
MOV BX, 1251h AX = (0111001101011011)2 = (29531)10 = (735Bh)
OR AX, BX
RET

3. MOV AX, 614Bh What would be the value of BX after program execution?

This study source was downloaded by 100000814011065 from CourseHero.com on 02-10-2022 18:17:09 GMT -06:00

https://www.coursehero.com/file/118595300/COMORG-TP-DACULAdocx/
MOV BX, 1251h AX = (0111001100011010)2 = (29466)10 =
(731Ah) XOR BX, AX
RET

4. MOV DX, 614Bh What would be the value of DX after program execution?
NOT DX AX = (1001111010110100)2 = (40628)10 =
(9EB4h) RET

5. MOV AX, 614Bh What would be the value of AX after program execution?
MOV BX, 1251h AX = (1110110111101111)2 = (60911)10 =
(EDEFh) AND AX, BX
NOT BX XOR
AX, BX RET

Part C: Rotate and Shift Instructions


Answer the question for each set of assembly codes. (5 items x 2 points)

1. MOV AX, 6Bh What would be the value of AL, in binary form, after program
SHR AL, 1 execution? AL = 0000
SHL AL, 3
RET

2. MOV AX, AAAAh In hexadecimal format, what would be the value of AX after
MOV CL, 8 program execution? AX = 1010101000000000
SHL AX, CL
RET

3. MOV AL, 8Ch What would be the value of AL, in binary form, after program
MOV CL, 3 execution? AL = 11110001
SAR AL, CL
RET

4. MOV AL, 6Bh In hexadecimal format, what would be the value of AL after
program
ROR AL, 1 execution? AL = 10100001
ROL AL, 3
RET

5. MOV AX, 6Bh What would be the value of AL, in binary form, after program
RCR AL 3 execution? AL = 00001101
RET

This study source was downloaded by 100000814011065 from CourseHero.com on 02-10-2022 18:17:09 GMT -06:00

https://www.coursehero.com/file/118595300/COMORG-TP-DACULAdocx/
Powered by TCPDF (www.tcpdf.org)

You might also like