Chapter 10 (Structures and Macros) – Assessment
True-False
Please indicate whether each statement is True (T) or False (F).
1. A structure variable cannot be declared inside another structure.
2. When defining a structure variable, you can specify default values for zero or more structure
fields.
3. An array can be declared as a structure member.
4. All fields in a UNION begin at the same offset.
5. When a macro is invoked, the CALL instruction executes if the macro uses the ASPROC operator.
6. A macro causes duplicate source code to be inserted into a program if the macro is invoked more
than once.
T
7. Replacing macro invocations with procedure calls tends to make a program run faster.
8. The IFNOTB directive permits assembly if its argument is not blank.
9. The IFNDIF directive permits assembly if two arguments are equal.
10. The IFDIFI directive performs a case-insensitive comparison between two arguments.
11. The following statements permits assembly if the symbol Win32 has been defined:
IFDEF Win32
12. The following statement permits assembly if arg1 is exactly the same as arg2? (case-senstitive
comparison):
IFIDN <arg1>,<arg2>
13. The following statements create five uninitialized DWORD variables in which each variable name
is a member of the following list: monday,tuesday,wednesday,thursday,friday:
FOR varName,<monday,tuesday,wednesday,thursday,friday>
DWORD varName <>
ENDM
14. The following statements exit a macro if the count argument is blank:
IFB <count>
EXITM
ENDIF
15. The following macro moves any 32-bit memory operand to any other 32-bit memory operand:
mMove32 MACRO destination,source
push eax
mov eax,source
mov destination,eax
pop eax
ENDM