内容 5.2 A Register-Machine Simulator · 425
练习 自检推理
Exercise 5.15: Add
instruction counting
to the register machine simulation. That is, have the machine model
keep track of the number of instructions executed. Extend the machine model’s
interface to accept a new message that prints the value of the instruction
count and resets the count to zero.
练习 5.15:向寄存器机器模拟添加指令计数功能,即让机器模型记录已执行的指令数。扩展机器模型的接口,使其接受一条新消息,用于打印指令计数值并将计数重置为零。
我的笔记 自动保存