QUESTION

Text
Image


Question 19 Excluding predefined symbols, show the symbol table for the following Hack Assembly at the end of the first pass: \[ \begin{array}{l} \text { @R0 } \\ \text { D=M } \\ \text { @END } \\ \text { D;JLE } \\ \text { @counter } \\ \text { M=D } \\ \text { @x } \\ \text { M=D } \\ \text { (LOOP) } \\ \text { D=D+A } \\ \text { @LOOP } \\ \text { D;JGT } \\ \text { (END) } \\ \text { @END } \\ \text { 0;JMP } \end{array} \] \begin{tabular}{|l|l|} \hline Symbol & Value \\ \hline & \\ \hline & \\ \hline & \\ \hline & \\ \hline & \\ \hline & \\ \hline \end{tabular} [Total for Question 19: 4 marks] Question 20 Show the final symbol table entries for the variables in the following Hack Assembly program: \begin{tabular}{|l|l|} \hline Symbol & Value \\ \hline & \\ \hline & \\ \hline & \\ \hline & \\ \hline \end{tabular} [Total for Question 20: 4 marks]
Question 17 What three kinds of symbols can appear in a Hack Assembly Language program? 1. 2. 3. [Total for Question 17: 6 marks] Question 18 When are the values determined for the three kinds of symbols that can appear in Hack Assembly? 1. 2. 3. [Total for Question 7: 18 marks]

Public Answer

AIS1LM The First Answerer