Chapter 13 (High-Level Language Interface) —
Assessment
True-False
Please indicate whether each statement is True (T) or False (F).
1. In Visual C++, an inline statement can refer to labels outside the __asm block.
2. In Visual C++, the PTR directive cannot be used in inline assembly code.
3. The EVEN and ALIGN directives can be used in Visual C++ inline assembly code.
4. At the beginning of an __asm block, general-purpose registers such as EAX and EBX may have
unknown values.
5. A language’s calling convention includes a list of which registers must be preserved by called
procedures.
6. Name decoration is used by C++ because it supports the overloading of function names.
7. The “C” specifier in extern declarations of procedures called from C++ tells the compiler to avoid
decorating (changing) the procdure name.
8. A program using the C calling convention pushes function arguments onto the stack from left to
right.
9. A language’s calling convention does not include the order in which parameters are passed.
10. C language programs automatically convert external identifiers to all uppercase letters.
11. The Visual C++ compiler contains command-line options for generating assembly language
source code.
12. In 32-bit mode, the offsets of stack parameters should always be calculated from EBP.
13. Optimizing C++ compilers rarely substitute registers in the place of variables when they generate
assembly language source code.
14. Although STDCALL is compatible with the Win32 API, it does not match the calling convention
15. used by C programs.
16. When a C++ functions is called, floating-point values inside the function are usually pushed on the
processor’s floating-point stack before returning to the function’s caller.