The shift routine shiftes 16 lines of the display to the right one bit at a time; bits shifted off the rightmost byte are shifted back onto the display in the [43]
LOC COSMAC CODE LNNO SOURCE LINE 1 .. AN 1802 ANIMATION PROGRAM by E. DEVEAUX 2 .. 78 3 BEGSFT=#78 .. ADDRESS OF FIRST LINE SHIFTED. 4 .. 5 .. THIS PROGRAM PROVIDES VARIABLE SPEED 6 .. ANIMATION OF THE IMAGE LOCATED AT #78 to 7 .. #F7 IN MEMORY. 8 .. SPEED CONTROL IS PROVIDED BY INPUT SWITCHES. D0 90 9 GHI R0 ..ZERO HIGH ORDER OF 01 B1 10 PHI R1 ..R1 R2 R3. 02 B2 11 PHI R2 03 B3 12 PHI R3 04 B4 13 PHI R4 ..R4 POINTS TO REFRESH 05 A4 14 PLO R4 ADDRESS 06 F816 15 LDI A.0(INTRPT) 08 A1 16 PLO R1 09 F813 17 LDI A.0(STACK) 0B A2 18 PLO R2 0C F831 19 LDI A.0(MAIN) 0E A3 20 PLO R3 0F D3 21 SEP R3 ..GO TO MAIN_LINE 10 01020300 22 DC#01020300 ..STACK AREA 13 23 STACK =*-1 24 .. 25 ..THIS PROGRAM USES A MODIFIED VERSION 26 ..OF THE INTERRUPT ROUTINE THAT APPEARED 27 ..IN COSMAC ELF PART 4. 28 .. 29 ..A SHIFT ROUTINE HAS BEEN ADDED THAT MOVES THE 30 .. STARSHIP FROM LEFT TO RIGHT ACROSS THE CRT. 31 .. 14 72 32 RETURN,LDXA 15 70 33 RET ..CYCLES 16 22 35 INTRPT,DEC R2 .. 2 17 78 36 SAV ..4 R5 COUNTS REFRESH 18 22 37 DEC R2 ..6 CYCLES, USED TO 19 52 38 STR R2 ..8 DETERMINE WHEN TO 1A 15 39 INC R5 ..10 SHIFT /ROLL. 1B C4 40 NOP ..13 1C 94 41 GHI R4 ..15 R4 TO R0[42] [43] [44] [45]