说明
本文是个人学习用的非官方中英对照译文,原文:https://diveintosystems.org/book/C8-IA32/conditional_control_loops.html。
原书采用 CC BY-NC-ND 4.0 许可(禁止演绎),请勿公开传播本译文。
标为「译注」「现代更新」的内容是译者补充,不代表原书作者观点;代码与原文逐字一致,未作改动。
8.4. Conditional Control and Loops
本节介绍用于条件语句和循环的汇编指令。回想一下,条件语句让程序员能根据条件表达式的结果改变程序的执行。编译器把条件语句翻译成修改指令指针(%eip)的汇编指令,使其指向一个并非程序顺序中下一个地址的地址。
This section covers assembly instructions for conditionals and loops. Recall that conditional statements enable coders to modify program execution based on the result of a conditional expression. The compiler translates conditionals into assembly instructions that modify the instruction pointer (
%eip) to point to an address that is not the next one in the program sequence.