Classic Computer Magazine Archive ANTIC VOL. 2, NO. 5 / AUGUST 1983

HELP!

STAR GAZING

There are a few mistakes in the program listing of Star Gazing on page 74 in the June 1983 issue of ANTIC.

Line 1030 should read:

1030 DATA 1. SCORPIUS,7100

Line 1040 should follow:

1040 DATA 2. ORION,7110

The words SCORPIUS and ORION should be in inverse video.

Also, in line 1440, the number following TAURUS should be 7260.

Also, to fit the program within space limitations, several questions were eliminated. However, some of the associated data was not. Therefore, lines 7270 through 7305 may be omitted or deleted without affecting the program.

TALK IS CHEAP

The following listings were inadvertently omitted from the article Talk Is Cheap, that appeared in ANTIC, July 1983 (p. 64):

20 FOR I=0 TO 243:READ Z:POKE 1536+I,Z:NEXT I
40 GOTO 140
60 FOR I= 16384 TO 32767:Z(PEEK(I))=Z(PEEK(I))+1:NEXT I:POKE 54272,34:POKE 559,34
80 ? #3;CH R$(27);CHR$(56);CH R$(29);
100 FOR I = 0 TO 255:? #3;I;" - "; Z (I); " ";
120 NEXT I:CLOSE #3:GOTO 160 
140 DIM Z(255),FN$(13)
160 GRAPHICS 0:? "OPTION--> 1 TALK A BIT":? "          2 PLAY BACK THE BIT":? "          3 TALK A LOT"
180 ? "          4 PRINT SUMMARY":? "          5 PRINT THE NUMBERS"
200 ? "          6 SAVE A TALK" :? "          7 RESTORE A TALK"
220 TRAP 220:INPUT ANS:IF ANS>7 THEN 220
240 TRAP 240:? "[CLEAR SCREEN]WHAT SAMPLE SPEED":INPUT SS:IF SS>255 THEN 240
260 ON ANS GOTO 280,360,460,340,420,500,580
280 POKE 208,1:POKE 205,0:POKE 206,64:POKE 207,SS:POKE 209,128
300 A=USR(1536):POKE 562,3:POKE 53775,3
320 GOTO 160
340 FOR I= 0 TO 255:Z(I)=0:NEXT I:POKE 54272,0:OPEN #3,8,0,"P:":POKE 559,0:GOTO 60
360 POKE 207,SS:POKE 203,0:POKE 204,64:POKE 208,0:POKE 206,128
380 A=USR(1536):POKE 562,3:POKE 53775,3
400 GOTO 160
420 OPEN #3,8,0,"P:":? #3;CHR$(27);CHR$(56);CHR$(29);:FOR I=16384 TO 32767:? #3;PEEK(I);" ";:NEXT I
440 CLOSE #3:GOTO 160
460 POKE 208,2:POKE 205,0:POKE 206,64:POKE 207,SS:POKE 209,128
480 A=USR(1536):GOTO 460
500 ? "GIVE FILE NAME";:INPUT FN$
520 TRAP 500:OPEN #4,8,0,FN$:TRAP 560
540 POKE 559,0:FOR I= 16384 TO 32767:PUT #4,PEEK(I):NEXT I
560 CLOSE #4:POKE 559,34:GOTO 160 
580 ? "GIVE FILE NAME";:INPUT FN$
600 TRAP 580:0PEN #4,4,0,FN$:TRAP 640
620 POKE 559,0:FOR I=16384 TO 32767:GET #4,Z:POKE I,Z:NEXT I
640 CLOSE #4:POKE 559,34:GOTO 160
660 DATA 104,169,8,141,31,208,173,31,208,41,1,208,249,160,255,162,255,32,149,6
680 DATA 136,208,248,169,8,141,31,208,166,208,224,0,208,3,76,181,6,169,0,141 
700 DATA 0,212,141,14,212,141,10,212,141,10,212,166,207,32,149,6,173,4,210,162
720 DATA 19,142,15,210,162,23,142,10,212,142,15,210,142,11,210,174,243,6,224,0
740 DATA 208,22,41,240,141,242,6,106,106,106,106,41,15,9,16,141,1,210,238,243
760 DATA 6,76,45,6,106,106,106,106,41,15,9,16,141,1,210,41,15,13,242,6
780 DATA 206,243,6,160,0,145,205,173,31,208,41,1,240,19,230,205,208,163,230,206
800 DATA 166,206,228,209,208,155,76,153,6,202,208,253,96,165,208,201,2,208,11,169
820 DATA 0,133,205,169,64,133,206,76,37,6,169,64,141,14,212,169,34,141,0,212
840 DATA 96,169,0,141,14,212,141,0,212,166,207,32,149,6,160,0,177,203,170,106
860 DATA 106,106,106,41,15,9,16,141,1,210,138,41,15,9,16,24,24,24,24,166
880 DATA 207,32,149,6,141,1,210,230,203,208,206,230,204,166,204,228,206,208,206,76
900 DATA 153,6,0,0

TYPO TABLE

Variable checksum = 106293
Line num range Code Length

    20 - 200     MF    532
   220 - 360     BG    521
   380 - 560     TU    513
   580 - 740     VZ    557
   760 - 880     NG    516
   900 - 900     DC     15

20 *= $600
30 PLA PULL OFF DUMMY ARG COUNT
40 LDA #$08
50 STA $D01F INIT SWITCHES
60 M1 LDA $D01F GET VALUE
70 AND #$01 ?START PRESSED
80 BNE M1 NOT YES
90 LDY #$FF DELAY
0100 M2 LDX #$FF SOME
0110 JSR DEL GO LOOP
0120 DEY
0130 BNE M2
0140 LDA #$08 RESET
0150 STA $D01F START SWITCH
0160 LDX 208 GET PARM
0170 CPX #0 ?PLAYBACK
0180 BNE NP NO
0190 JMP PB GO PLAY BACK SOUND
0200 NP LDA #0
0210 STA $D400 KILL DMA
0220 STA $D40E KILL VBI
D230 MD STA $D40A WSYNC
0240 STA $D40A WSYNC
0250 DONE LDX 207
0260 JSR DEL GO WAIT IF NEED BE
0270 LDA $D204 GET INPUT BYTE
0280 GO LDX #$13
0290 STX $D20F TURN OFF FAST SCAN
0300 LDX #$ 17
0310 STX $D40A WSYNC
0320 STX $D20F SAY FAST POT SCAN
0330 STX $D20B START SCAN
0340 LDX FLAG
0350 CPX #0 ?LEFT HALF OF BYTE
0360 BNE RT NO
0370 AND #$F0
0380 STA BYTE SAVE IT
0390 ROR A
0400 ROR A
0410 ROR A
0420 ROR A
0430 AND #$0F
0440 ORA #$10 SAY USE 4 BIT D/A
0450 STA $D201 ECHO TO SPEAKER
0460 INC FLAG SAY RIGHT NEXT
0470 JMP MD
0480 RT ROR A
0490 ROR A
0500 ROR A
0510 ROR A
0520 AND #$0F
0530 ORA #$10 SAY USE 4 BIT D/A
0540 STA $D201 SAY SOMETHING
0550 AND #$0F REMOVE TOP 4 BITS
0560 ORA BYTE ADD IN LEFT NIBBLE
0570 DEC FLAG SAY LEFT NEXT
0580 LDY #0
0590 STA (205),Y SAVE TO BYTE
0600 LDA $D01F
0610 AND #$01 ?START KEY
0620 BEQ FINI YES
0630 D3 INC 205 INCREMENT
0640 BNE MD BUFFER
0650 INC 206 AREA
0660 LDX 206 POINTER
0670 CPX 209 ?END OF MEMORY
0680 BNE MD NO CONTINUE
0690 JMP FINI GO FINISH THINGS
0700 DEL DEX
0710 BNE DEL
0720 RTS
0730 FINI LDA 208 v.TALK A LOT
0740 CMP #2 ?HUH
0750 BNE FINI1 NO, JUST RETURN
0760 LDA #0 RESET
0770 STA 205 BUFFER
0780 LDA #64 START
0790 STA 206 POINTERS
0800 JMP NP AND DO IT AGAIN
0810 FINI1 LDA #$40
0820 STA $D40E RESTART VBI'S
0830 LDA #$22 AND SCREEN DMA
0840 STA $D400
0850 RTS
0860 PB LDA #0
0870 STA $D40E KILL VBI
D880 STA $D400 KILL DMA
0890 PB1 LDX 207 GET DELAY COUNT
0900 JSR DEL
0910 LDY #0
0920 LDA (203),Y GET SOME DATA
0930 TAX
0940 ROR A
0950 ROR A
0960 ROR A
0970 ROR A
0980 AND #$0F GET LEFT NIBBLE
0990 ORA #$10 SAY USE D/A
1000 STA $D201 STORE THE VALUE
1010 TXA
1020 AND #$0F
1030 ORA #$10
1040 CLC
1050 C LC
1060 C LC
1070 CLC
1080 LDX 207 GET DELAY VALUE
1090 JSR DEL
1100 STA $D201 MAKE SOME NOISE
1110 D4 INC 203 INCREMENT
1120 BNE PB
1130 INC 204 BUFFER
1140 LDX 204
1150 CPX 206 POINTERA
1160 BNE PB1
1170 JMP FINI
1180 BYTE .BYTE 0
1190 FLAG .BYTE 0

CONSERVE RAM

The following listing was inadvertently omitted from the article Conserve RAM by Jerry White. The article originally appeared on page 50 of the July 1983 issue of ANTIC.

1 REM DATA2STR (DATA TO STRING) 12/23/82 by Jerry White
2 REM THIS PROGRAM CREATES AN ASM
3 REM SUBROUTINE IN LINE NUMBER 100.
4 REM AT THE READY PROMPT
5 REM LIST"C:",100 OR
6 REM LIST"D:FILENAME.LST",100
7 REM
200 GRAPHICS 0:POKE 82,2:POKE 83,39:PO
KE 710,240:POKE 712,240:POKE 709,13
300 DIM BASIC$(120):BASIC$="100 GRAPHICS 0:ASM=ADR("
400 BASIC$(LEN(BASIC$)+ 1)=CHR$(34)
500 READ NUMBER:IF NUMBER=999 THEN 700
600 BASIC$(LEN(BASIC$)+ 1)=CHR$(NUMBER):GOTO 500
700 BASIC$(LEN(BASIC$)+ 1)=CHR$(34)
800 BASIC$(LEN(BASIC$)+1)="):X=USR(ASM):STOP"
900 ?:?:? BASIC$:POSITION 2,0:POKE 764,12:END
1000 REM DATA FOR ASM SUBROUTINE
1001 REM
1010 DATA 104
1011 REM .KEEP BASIC HAPPY PLA
1012 REM
1020 DATA 169,2
1021 REM .LEFT MARGIN LDA #2
1022 REM
1030 DATA 133,82
1031 REM .POKE 82,2 STA 82
1032 REM
1040 DATA 169,39
1041 REM .RIGHT MARGIN LDA #39
1042 REM
1050 DATA 133,83
1051 REM .POKE 83,39 STA 83
1052 REM
1060 DATA 169,144
1061 REM .BACKGROUND COLOR LDA #144
1062 REM
1070 DATA 141,198,2
1071 REM .POKE 710,144 STA 710
1072 REM
1080 DATA 169,55
1081 REM .BORDER COLOR LDA #55
1082 REM
1090 DATA 141,200,2
1091 REM .POKE 712,55 STA 712
1092 REM
1100 DATA 169,13
1101 REM .FOREGROUND COLOR LDA #13
1102 REM
1110 DATA 141,197,2
1111 REM .POKE 709,13 STA 709
1112 REM
1120 DATA 96
1121 REM .RETURN TO BASIC RTS
1122 REM
1130 DATA 999

TYPO TABLE

Variable checksum = 98094
Line num range Code Length

    1 - 600      RB    463
  700 - 1030     YR    265
 1031 - 1070     PD    207
 1071 - 1110     PV    210
 1111 - 1130     EF     91