Question: 1 . ( 1 2 marks ) For the program: Convert the following assembly code into machine code Identify the bugs from the NASM point
marks For the program:
Convert the following assembly code into machine code
Identify the bugs from the NASM point of view
Identify the design defect has no effect on the program operation
Is the memory properly aligned?
ORG BH
NUM DB
NUM DW
NUM DB
ORG H MOV AH Num MOV AL Num
MOV BXBH AND AXBX
MOV Num AX INT
marks For question determine the program size and cycle count. Do not include INT as part
of the metrics.
Assembly
#
~
ORG BH
NUM DB
NUM DW
NUM DB
ORG H
MOV AH NUM
MOV AL NUM
MOV BXBH
AND AX BX
MOV NUM AX
INT
TOTALS
marks Convert the following machine code into assembly code. You can use any address for the
data section.
B
B
B
B
B
A
B
B
E
B
C
A
A B
B
C
D E
E
F
B
CC
marks Convert the following C code snippet into assembly language. Assume that the data section begins at CH
uintt Num Num Num; ifNum Num Num Num Num; else Num Num Num;
There are many possible solutions.
BONUS marks Convert the assembly code in question into machine code.
BONUS marks Determine the program size in question as well as the cycle count worstcase and bestcase, eg based on whether the branch is taken or not
Label
Assembly
#~
Worst Case
#~
Best Case
#~
marks There are multiple ways to convert AX DX into assembly. Which of the following is the best solution? careful there are some hidden considerations as well
marks What is wrong with the following code general point of view for assembly and how does the second style rectify the problem?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
