Show the expanded code produced by the following statement that invokes the mWriteString macro from Section 10.2.5:mWriteStr namePrompt
Show the expanded code produced by the following statement that invokes the mWriteString macro from Section 10.2.5:
mWriteStr namePrompt
Solution:
Expanded code produced by the mWriteStr name Prompt statement which invokes mWriteString macro is as follows:
code definition: mWriteStr MACRO buffer
push edx
mov edx,OFFSET buffer
call WriteString
pop edx
ENDM
expanded code: 1 push edx
1 mov edx,OFFSET namePrompt
1 call WriteString
1 pop edx
- In the expanded code the argument namePrompt replaces the parameter buffer in the code definition
- when an invalid argument is passed error is caught in the expanded code and corrected during the assembly
Step by step
Solved in 2 steps with 1 images