Classic Computer Magazine Archive PROGRAM LISTING: 84-07/ROBOT.4TH


Screen: 50
  0 ( CONSTANTS ***** EWR/ANTIC MAG )
  1 : EQU CONSTANT ; HEX
  2   10 EQU POKMSK
  3 D400 EQU DMACTL  22F EQU SDMCTL
  4 D208 EQU AUDCTL D203 EQU AUDC2
  5 D302 EQU PACTL  D300 EQU PORTA
  6  224 EQU VVBLKD  212 EQU VTIMR2
  7  600 EQU SERVO0  601 EQU SERVO1
  8  602 EQU SERVO2  603 EQU SERVO3
  9  604 EQU SERVO4  605 EQU SERVO5
 10  606 EQU SERVO6  607 EQU SERVO7
 11  608 EQU OPULS0  609 EQU OPULS1
 12  60A EQU OPULS2  60B EQU OPULS3
 13  60C EQU OPULS4  60D EQU OPULS5
 14  60E EQU OPULS6  60F EQU OPULS7
 15                              -->

Screen: 51
  0 ( PAGE 6 CODE )
  1
  2 0 VARIABLE 6CODE -2 ALLOT
  3 2020 , 2020 , 2020 , 2020 ,
  4 DECIMAL ( OPULS0-7 VALUES: )
  5 64 C, 64 C, 64 C, 64 C,
  6 64 C, 64 C, 64 C, 64 C, HEX
  7 0000 , 11AD , 8D06 , D300 ,
  8 110E , AE06 , 0610 , 08E0 ,
  9 10F0 , BD18 , 0600 , 087D ,
 10 8DO6 , D202 , 098D , EED2 ,
 11 0610 , A260 , 8E00 , 0610 ,
 12 088E , 8ED2 , D400 , 8EE8 ,
 13 0611 , 10A5 , 0209 , 0E8D ,
 14 20D2 , 0612 , 624C , 8AE4 ,
 15 2048 , 0612 , AA68 , 4068 ,  -->

Screen: 52
  0 ( SETUP START STOP )
  1 : SETUP ( -- )
  2 6CODE 600 58 CMOVE
  3 PACTL C@ DUP FB AND PACTL C!
  4 FF PORTA C! PACTL C!
  5 A0 AUDC2 C! 64F VTIMR2 ! ;
  6
  7 SETUP
  8
  9 : START ( -- )
 10   C2 POKMSK C!  0 D40E C!
 11   633 VVBLKD ! 40 D40E C! ;
 12
 13 : STOP ( -- )
 14    0 D40E C! E462 VVBLKD !
 15   40 D40E C! C0 POKMSK C! ;  -->

Screen: 53
  0 ( TEST )
  1
  2 DECIMAL
  3
  4 : TEST ( -- )
  5   START 10 0
  6   DO 8 0
  7    DO SERVO0 I + C@ DUP 20 +
  8     SERVO0 I + C! 6000 0 DO LOOP
  9     SERVO0 I + C! 6000 0 DO LOOP
 10    LOOP
 11    ?TERMINAL IF LEAVE ENDIF
 12   LOOP STOP ;
 13
 14
 15

Back to previous page