Assembly Language for x86 Processors --- 5.5 课后习题答案

5.5 Defining and Using Procedures

1 The RET instruction pops the top of the stack into the instruction pointer.

答 :√

2 The USES operator lets you name all registers that are modified within a procedure.

答 :√

3 In protected mode, each procedure call uses a minimum of 4 bytes of stack space.

答 :√

4 The CALL instruction pushes the offset of the instruction following the CALL on the stack.

答 :√

5 The ESI and EDI registers cannot be used when passing parameters to procedures.

答 :×

6 The register list in the USES directive must use commas to separate the register names.

答 :×

7 The USES operator only generates PUSH instructions, so you must code POP instructions yourself.

答 :×

8 The PROC directive begins a procedure and the ENDP directive ends a procedure.

答 :√

9 Nested procedure calls are not permitted by the Microsoft assembler unless the NESTED operator is used in the procedure definition.

答 :×

10 It is possible to define a procedure inside an existing procedure.

答 :×

11 The CALL instruction pushes the offset of the CALL instruction on the stack.

答 :×

12 What would happen if the RET instruction was omitted from a procedure?

答 :Execution would continue beyond the end of the procedure, possibly into the beginning of another procedure. This type of programming bug is often dificult to detect!

猜你喜欢

转载自blog.csdn.net/weixin_43574277/article/details/106131843