Now that the HP-65 Delayed Select Group instruction is behaving just like the real thing, it becomes possible to see what the real microcode does for the [R/S] key and as a program step. Here’s the details:
When pressing the [R/S] key to start a program it does this:
01101 0 -> c[m] 01102 delayed select group 1 01103 c <-> m ; C= 03000000000000 M= 10000000000221 05104 delayed select rom 1 05105 goto 04604 04604 if s8 = 0 04605 goto 04405 04405 if s9 = 0 04406 goto 04434 04434 rom 2 05035 goto 05376 05376 delayed select group 0 05377 goto 05223 01223 clearstatus 01224 1 -> s8 ; S= ........8... 01225 1 -> s10 ; S= ........8.a. 01226 goto 01217 01217 rom 1 00620 if s8 = 0 00621 goto 00531 00622 ...
When encountering an R/S instruction in a program it does this:
01101 0 -> c[m] 01102 delayed select group 1 01103 c <-> m ; C= 04000000000000 M= 10000000000221 05104 delayed select rom 1 05105 goto 04604 04604 if s8 = 0 04605 goto 04405 04606 goto 04502 04502 shiftr a[w] ; A= 04000000000000 04503 c -> a[s] 04504 delayed select group 0 04505 rom 2 01106 goto 01354 01354 if s1 = 0 ; if data entry not in progress 01355 goto 01213 01213 clearstatus ; S= ............ 01214 goto 01266 01266 1 -> f3 ; f= .123.5.. 01267 goto 01240 01240 jsb 01167 01167 if s8 = 0 01170 goto 01123 01123 clearstatus 01124 return 01241 goto 01334 01334 if c[m] >= 1 01335 goto 01337 01337 if p # 14 01340 goto 01217 01217 rom 1 00620 if s8 = 0 00621 goto 00531 display: 00531 ...
The two could be summarized as:
01101 0 -> c[m] ; clear prefix flags (f f-1 g STO ...) 01103 c <-> m ; X to C, state to M 04604 if s8 = 1 ; if running 04502 shiftr a[w] ; undo 00755 shiftl 04503 c -> a[s] ; and get sign back (C has it) 01354 if s1 = 1 ; if data entry in progress 01356 0 -> f1 ; clear auto-enter flag 01357 endif 01213 clearstatus ; clear the running flag (&others) 01266 1 -> f3 ; set update display flag 01334 if c[m] = 0 ; if mantissa = 0 01336 0 -> c[w] ; set exponent = 0 too 01337 endif 04405 else 01223 clearstatus 01224 1 -> s8 ; set running 01225 1 -> s10 ; set don't interrupt 00620 endif
The full trace is in 65-rs.txt