2 /IDLE RANDOM NUMBER GENERATOR
12 IDLAD, ADDR #IDLE-1 / Pointer to idle routine in FRTS
14 JOB, ADDR DOIT / Address of routine to run
34 DATABL, 1763-1 / Address of Direct Access table entry 8 in FRTS
35 COUNT, 0 / Idle loop count
36 COUNT2, 7774 / Outer counter
37 RESET, 7774 / Outer counter value
52 TRAP4 SET8 /GO TO 8 MODE STUFF.
53 JA RET /DONE. ON IDLE QUEUE.
57 / Horrible hackery. This sets up the FRTS direct access table
58 / to allow us to open the ADVENT.DA file without having to
59 / rebuild it each time. Open it using USR, and this lets us
60 / go use it later. (DEFINE FILE always creates a new one.)
72 JMP SFIELD /ALREADY DONE
73 TAD IDLAD /FIELD OF IDLE ROUTINE
76 TAD IDLAD+1 /ADDRESS OF #IDLE
79 TAD SKPINS /SKP INSTRUCTION
80 DCAZ% X4 /STORE AT #IDLE
81 TAD JOB+1 /ADDRESS OF IDLE ROUTINE
82 DCAZ% X4 /STORE AT #IDLE+1
86 DCAZ% X4 /STORE AT #IDLE+2
94 DOIT, SKP / Entry point, one-time use constant
95 TAD ROTWRD /GET WORD TO DISPLAY
100 FLOP, RAL /Shift over
102 TAD RESET /Reset outer counter
107 FLIP, RAR /Rotate back
110 DCA COUNT /Save old rotate
111 TAD FLIP /And flip 'em around
139 / Change field number into CDF instruction
143 TAD SCDF /CDF TO #IDLE