Popular Electronics
JULY 1977
[42] [43] [44] [45]
[Part 1] [Part 2] [Part 3] [Part 4] [Part 4a]

high-order position of the first byte on the line.

The 32 lines of the display can be moved up one line by incrementing the starting refresh address by eight between refresh cycles. Decrementing register 4 (R4) allows the display to be rolled down. Hence, varying the frequency of shifts or rolls varies the animation speed of the displayed image.

Control of the speed is via the Elf's conventional INPUT switches. Setting all switches to zero and depressing the INPUT pushbutton causes a hex 00 to be read into location 13 (stack), in which case, there will be no movement of the displayed image. Loading any nonzero bit through the INPUT switches will animate the image. Any bits loaded are compared to the bits in the low-order byte of R5 and the bits in the byte read into location 13. Register 5 is used to count the refresh cycles and is incremented by one every interrupt cycle.[44]

LOC  COSMAC CODE  LNNO   SOURCE LINE

1D   B0           42               PHI  R0       ..17 REFRESH ADDRESS
1E   84           43               GLO  R4       ..19
1F   A0           44               PLO  R0       ..21
                  45                             ..
20   80           46               GLO  R0       ..23
21   80           47               GLO  R0       ..25
22   80           48        REFRESH:GLO  R0      .. 27
23   E2           49                SEX  R2      .. 29  8 DMA CYCLES
                  50                             ..
24   E2           51                SEX  R2      ..
25   20           52                DEC  R0
26   A0           53                PLO  R0      ..     8 DMA CYCLES
                  54                             ..
27   E2           55                SEX  R2
28   20           56                DEC  R0
29   A0           57                PLO  R0      ..     8 DMA CYCLES
                  58                             ..
2A   E2           59                SEX  R2
2B   20           60                DEC  R0
2C   A0           61                             ..
                  62                             ..
2D   3C22         63                BNI  REFRESH .. ON EF1 REFRESH
2F   3014         64                BR  RETURN   .. IS OVER.
31   E2           65        MAIN:SEX    R2       .. RX=2
32   69           66                IMP  1       .. TELL 1861 TO
                  67                             .. TURN ON CRT.
                  68 ..SFREAD READS INPUT SWITCHESTO CONTROL
                  69 ..SPEED OF SHIFTS/ROLLS.
                  70 ..INPUT SWITCH IS STORED AT STACK M(R2).
                  71 ..
                  72 ..INITIAL VALUE OF STACK IS ZERO AND THERE IS
                  73 ..NO MOVEMENT OF STAR SHIP UNTIL A NON ZERO BIT
                  74 ..IS INPUT.
33   3F38         75       SPREAD:BN4   CKSHIF   .. IF NO INPUT GO SEE
35   3735         76       WTREAD:B4    WTREAD   .. IF TIME TO SHIFT.
37   6C           77              INP   4        .. READ INTO STACK.
                  78 ..                          ..
38   85           79       CHKSHIF:GLO  R5       .. GHI R5 VARY/SPEED
39   F2           80               AND           .. OF STAR SHIP.
3A   3233         81               BZ   SPREAD   .. SHIFT/ROLL BIT MATCH.
3C   F800         82               LDI  A.1(BEGSFT)   ..BR ROLL 3061
3E   B9           83               PHI  R9            ..ROLL NO SHIFT

[42] [43] [44] [45]
[Part 1] [Part 2] [Part 3] [Part 4] [Part 4a]
43 JULY 1977