Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A Couple really short MASM questions 1) The fomal name of the LOOP instruction i

ID: 3690581 • Letter: A

Question

A Couple really short MASM questions

1) The fomal name of the LOOP instruction is

a. Loop Accoring to EBX Counter

b. Loop According to ECX Counter

c. Loop According to CSI Counter

d. Like Object Orientated Programming

I think it is b but I am not sure.

2) There are several important uses of runtime stacks in programs (select all that apply):

a. When the CALL instruction executes, the CPU saves the current subroutine’s return address
on the stack.

b. A stack makes a convenient temporary save area for registers when they are used for more
than one purpose. After they are modified, they can be restored to their original values.

c. The stack provides temporary storage for local variables inside subroutines.

d. When calling a subroutine, you pass input values called arguments by pushing them on the stack.

3) Which of the following is NOT a valid MOV operation? Table 4-1 might be helpful. (check any/all that apply)

a. MOV reg,reg b. MOV reg,imm c. MOV imm,imm d. MOV imm,mem

e. MOV mem,mem f. MOV mem,reg g. MOV reg,mem h. MOV mem,imm

I think this is c and d

Explanation / Answer

1.

In MASM, whenever the loop is executed, the ECX register value is incremented or decremented based the requirement. Therefore, the formal name of the LOOP instruction is LOOP According to ECX counter.

Hence, the option (b) is correct answer.

-------------------------------------------------------------------------------------------------------------------

2.

Uses of stack:

Hence, all of the above options correct.

-------------------------------------------------------------------------------------------------------

3.

The register to register addressing is possible. And can move the immediate value to the register, can mov the operand directly from memory to memory, memory to register, memory to immediate address.

But, immediate to immediate addressing and immediate to memory addressing are illegal mov instructions.

Hence, the correct options are (c) & (d).

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote