Clarification
Thursday, October 27, 2011 at 1:08PM It was brought to my attention that slide #12 of the Chapter 4 PowerPoint deck is slightly misleading when it says "All conditional jumps refer to the current value of D." In Hack assembly, all commands take the form
dest = comp ; jump
where dest, comp and jump can take any of the values listed on the slide. The conditional jump instructions always compare comp against 0 with comp on the left side of the inequality and the 0 on the right as illustrated by Figure 4.5 on page 69 of the text, shown below. In the figure, out refers to the result of comp, whatever operation or constant value it may be.
Figure 4.5, page 69
This is, I believe, consistent with what was said in class and with all the examples we covered as a group. However, when a student pointed it out to me earlier today even I found myself stumbling over the wording of the slide and we will need a clear understanding of how the conditional jump instructions work going forward. Hopefully this will help you as you work through the handful of examples given below.
Joe Paris | Comments Off |