The Program Counter is the memory cell with the red border.
[quote=“johnkershaw,post:45,topic:37277”]
look at this code:
LDA :var // load 55 into register
OUT // show 55 to the user
BRP :end // branch if positive (we'll branch in this case)
OUT // show 55 to the user (never happens)
end: HLT // quit program
var: 55
and compile it
hit [step]:
[x] memory cell 00 is the current program counter (red), memory cell 05 is refered to as a source (green), register now holds 55
hit [step]:
[x] user is prompted with ‘55’
hit [step]:
[x] BRP is executed… memory cell 03 is the current program counter (red), the potential jump to memory cell 04 is refered to (green), register holds 55, so branching occurs
[x] what else is there to display to the students - there is nothing more to show :persecutioncomplex:
hit [step]:
[x] program halted due to earlier conditional jump (never reaches 2nd OUT)