计算机问题求解一论题1-7 不同的程序设计方法 2015年11月5日
计算机问题求解 – 论题1-7 - 不同的程序设计方法 2015年11月5日
检查 Since this information is unavailable to the compiler,the machine code it generates for the expression a[j]just takes the address of a (that is, the first cell of the array),adds j to it,and retrieves the value stored in that address.(In fact,the same expression can also be written in C as *(a +j), which more closely reflects its implementation.)In contrast,when the PL/I compiler encounters the corresponding expression,it will also generate code to check that the index is indeed within the legal bounds
检查 Since this information is unavailable to the compiler, the machine code it generates for the expression a[ j ] just takes the address of a (that is, the first cell of the array), adds j to it, and retrieves the value stored in that address. (In fact, the same expression can also be written in C as ∗(a + j ), which more closely reflects its implementation.) In contrast, when the PL/I compiler encounters the corresponding expression, it will also generate code to check that the index is indeed within the legal bounds
问题0 ■计算机真正能够“识别”和“执行”的程序是什么? o机器代a码,hard wired primitive instructions and it combination instructions ■我们能否编写这样的程序?
问题0 计算机真正能够“识别”和“执行”的程序是什么? 机器代码,hard wired primitive instructions and it combination instructions 我们能否编写这样的程序?
问题1 0 我们常说“高级程序设计”,有没有与之对应的“低级”程序 设计? 如果有,两者是什么区别? o抽象VS具体 口巨大的“细节”鸿沟
问题1 我们常说“高级程序设计”,有没有与之对应的“低级”程序 设计? 如果有,两者是什么区别? 抽象 VS 具体 巨大的“细节”鸿沟
Instruction pointer IP 10 *COPY AX,X 13 11*A0 x,Y· ietch Istructans 12 *COOPY G1,AX· Instruction register 13 *COPY AX,CNI* *COPY CN1,AX 140P厘2X· D&E Candition flag CF 20 (X) 21 (YI Data Computation register AX 22 6 (21 23 11 11 (Cw1) Cx- cule Central processing unit MemDry 每个汇编语言的语句(大致)对应于一条机器能够 “理解”并“执行”的机器语言的“指令
每个汇编语言的语句(大致)对应于一条机器能够 “理解”并“执行”的机器语言的“指令