When the HP-65 calculator is sitting idle, waiting for you to get it to do something, what is it thinking? What’s going through its head?
Whilst seemingly idle, the HP-65 and any HP65 microcode emulator is busily spinning through a “wait loop” checking to see if you need it to do something. It looks like this:
waitloop1: 00726 if s9 = 0 ; S= 0........... 00727 goto 00622 waitloop2: 00622 12 -> p ; P= 12 00623 if s0 = 0 00624 goto 00452 00452 0 -> s10 00453 if s5 = 0 00454 goto 00750 00750 if s8 = 0 00751 goto 00441 00441 0 -> s11 00442 0 -> f0 00443 if s11 = 0 00444 goto 00620 00620 if s8 = 0 00621 goto 00531 00531 0 -> s3 00532 1 -> f2 00533 1 -> p ; P= 1 00534 c <-> m ; C= 00000000000221 M =04820000000001 00535 0 -> s11 00536 0 -> f3 00537 if s3 = 0 00540 goto 00552 00552 if s11 = 0 00553 goto 00764 waitloop3: 00764 if c[p] = 0 00765 goto 00776 00766 c - 1 -> c[p] ; C= 00000000000211 00767 if c[p] = 0 00770 goto 00717 00771 c - 1 -> c[p] ; C= 00000000000201 00772 if c[p] >= 1 00773 goto 00611 waitloop4: 00774 c + 1 -> c[p] ; C= 00000000000211 00775 c + 1 -> c[p] ; C= 00000000000221 00776 c <-> m ; C= 04820000000001 M =00000000000221 00777 goto 00726
If you press a key, S0 gets set to 1 so the sequence
00623 if s0 = 0 00624 goto 00452
proceeds to 00625.
There’s more here which I’ll explore and cover shortly.