2. Given the following data declarations: .data Alpha BYTE 2Bh, 23h, 4Ah Beta DW
ID: 3754127 • Letter: 2
Question
2. Given the following data declarations: .data Alpha BYTE 2Bh, 23h, 4Ah Beta DWORD 222h Delta DWORD 312h Iota DWORD 434h Zeta WORD 124h A. Write instructions that move Beta into EAX and then adds Beta to the same register B. Write a set of instructions that adds all the elements of the array Alpha into AL c. Write a set of instructions that moves Beta into EAX, adds the value stored in Zeta to the same register D. Write an instruction that moves the last two bytes in ALPHA into CX. E. What are the contents of CX subsequent to part D of this question?Explanation / Answer
FIRSTLY HAVE A BASIC IDEA OF ALL THE IMPORTANT INSTRUCTIONS THEN GO THROUGH THE ANSWERS. ANY FURTHER QUERIES COMMENT PLZZ!!
A. MOV EAX,Beta
ADD EAX,beta
B.LEA SI,Alpha //POINTS TO STARTING ADDRESS OF THE ARRAY Alpha
MOV Al,[SI]
GO:ADD AL,[SI]
INC SI
JNZ GO
C.MOV EAX,Beta
MOV EBX,Zeta
ADD EBX,Zeta
D.LEA SI,ALPHA
MOV A,[SI]
INC SI
MOV CX,[SI]
INC SI
MOV CX,[SI]
E. CX has only the last two vaues of Alpha
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.