Page 1 of 1

Auto-run a BASIC program

Posted: Wed Nov 17, 2010 11:51 pm
by zephyr
Instructions for a quick-and-dirty method of auto-running a BASIC program from cassette.

N/B This method is not DOS compatible. Use one of the free DOS detach programs, or remove your DOS controller before loading (1) your BASIC program.

(1) Load your BASIC program

(2) Insert a blank cassette into your cassette recorder

(3) Carefully type in the following at the BASIC command prompt

Dragon:

Code: Select all

POKE144,2:POKE145,0:CLS:CSAVEM"AUTORUN",166,PEEK(27)*256+PEEK(28),35725:POKE25,30:POKE26,1:POKE27,PEEK(126):POKE28,PEEK(127)-1:POKE29,PEEK(27):POKE30,PEEK(28):POKE31,PEEK(27):POKE32,PEEK(28):RUN
CoCo:

Code: Select all

POKE146,2:POKE147,0:CLS:CSAVEM"AUTORUN",166,PEEK(27)*256+PEEK(28),46154:POKE25,30:POKE26,1:POKE27,PEEK(126):POKE28,PEEK(127)-1:POKE29,PEEK(27):POKE30,PEEK(28):POKE31,PEEK(27):POKE32,PEEK(28):RUN
(4) Press PLAY and RECORD on your cassette player, and press ENTER to save

Re: Auto-run a BASIC program

Posted: Wed Nov 24, 2010 10:48 pm
by zephyr
Here's an alternative method of auto-running a BASIC program. EDIT: Updated 2nd December, 05:15 pm

First you must type in one of the following BASIC programs, RUN it, and save the machine code to cassette using the START, END, and EXEC addresses displayed on screen.

e.g.
Dragon:

Code: Select all

CSAVEM"ARUNDGN",1536,1717,1536
CoCo:

Code: Select all

CSAVEM"ARUNCOCO",1536,1717,1536
Alternatively, you can record one of the attached audio WAV files from your PC to a suitable cassette.

Dragon:

Code: Select all

0 'BASIC AUTO-RUN V2.0
1 'FOR THE DRAGON 32/64
2 'BY STEPHEN J WOOLHAM
3 '
10 CLS:PRINT"WRITING MACHINE CODE..."
20 FOR I=1536 TO 1717:READ A$:X=VAL("&H"+A$):CSUM=CSUM+X:POKEI,X:NEXT
30 CLS:IF CSUM<>17121 THEN PRINT"ERROR IN DATA LINES":END
40 PRINT"START ADDRESS = 1536"
50 PRINT"END ADDRESS = 1717"
60 PRINT"EXEC ADDRESS = 1536"
70 POKE144,2:POKE145,0:END
100 DATA 9E,19,BF,6,9B,BD,BA,77,CC,0,A9,8E,6,4E,8D,2E,DC,1B,FD,6,A0,8E,6,56,8D,24,CC,8B,8D,8E,6,5C,8D,1C,8E,2,0,9F,7E,9F,90,CC,3B,7E,B7,1,9,F7,1,8E,8E,6,73,BF,1,8F,8E,6,64,9F
110 DATA A9,39,34,6,F,6F,BD,90,E5,35,6,BD,95,7A,86,D,7E,B5,4A,53,54,41,52,54,3A,20,0,45,4E,44,3A,20,0,45,58,45,43,3A,20,0,34,11,8D,13,26,4,D,81,27,15,35,11,7E,BB,26,34,11,8D,4,27
120 DATA A,35,91,9E,7E,30,1F,BC,6,A0,39,1A,50,BE,C0,0,8C,44,4B,26,3,7F,FF,48,8E,BB,26,9F,A9,86,39,B7,1,8E,8E,0,0,9F,19,8E,0,0,9F,1B,9F,1D,9F,1F,F,6F,BD,84,1F,BD,80,18,BD,83,ED,7E,84,9F
CoCo:

Code: Select all

0 'BASIC AUTO-RUN V2.0
1 'FOR TANDY COLOR COMPUTER
2 'MODELS 1, 2, AND 3
3 'BY STEPHEN J WOOLHAM
4 '
10 CLS:PRINT"WRITING MACHINE CODE..."
20 FOR I=1536 TO 1717:READ A$:X=VAL("&H"+A$):CSUM=CSUM+X:POKEI,X:NEXT
30 CLS:IF CSUM<>17548 THEN PRINT"ERROR IN DATA LINES":END
40 PRINT"START ADDRESS = 1536"
50 PRINT"END ADDRESS = 1717"
60 PRINT"EXEC ADDRESS = 1536"
70 POKE146,2:POKE147,0:END
100 DATA 9E,19,BF,6,9B,BD,A9,28,CC,0,A9,8E,6,4A,8D,2A,DC,1B,FD,6,A0,8E,6,52,8D,20,CC,B4,4A,8E,6,58,8D,18,8E,2,0,9F,7E,9F,92,86,3B,B7,1,9,8E,6,6F,BF,1,92,8E,6,60,9F,A9,39,34,6
110 DATA F,6F,BD,B9,9C,35,6,BD,BD,CC,86,D,7E,A2,82,53,54,41,52,54,3A,20,0,45,4E,44,3A,20,0,45,58,45,43,3A,20,0,34,11,8D,16,26,4,D,81,27,18,35,11,7E,AA,1A,34,11,8D,7,27,D,35,11,7E
120 DATA 88,F0,9E,7E,30,1F,BC,6,A0,39,1A,50,BE,C0,0,8C,44,4B,26,3,7F,FF,40,8E,AA,1A,9F,A9,8E,88,F0,BF,1,92,8E,0,0,9F,19,8E,0,0,9F,1B,9F,1D,9F,1F,F,6F,BD,AD,21,BD,A7,EB,BD,AC,EF,7E,AD,9E
Once you have your machine code program saved to cassette, follow these simple step-by-step instructions to auto-run any BASIC program.

Note: If you are using DOS, use one of the free DOS detach programs, or remove your DOS controller cartridge.

(1) CLOADM "ARUNDGN" (Dragon 32/64) or "ARUNCOCO" (Tandy CoCo)

(2) CLOAD your BASIC program

(3) Type EXEC, and save your program to cassette using the three addresses displayed on screen

e.g.

Code: Select all

START: 169
END: 15000
EXEC: 32725

CLS:PRINT"LOADING...":CSAVEM"PROGNAME",169,15000,32725

Re: Auto-run a BASIC program

Posted: Tue Nov 30, 2010 11:10 pm
by zephyr
Here's an example of what to expect when you auto-run a BASIC program using the above methods. Attached is a copy of Mario Zamora's Flipper saved to cassette with Steve Woolham's BASIC AUTO-RUN V2.0, ERROR-RUN V1.0, and BREAK KEY DISABLE V1.0 routines. The BASIC source code is included.

CLOADM to load, and auto-run the game. The game will load, and run correctly, even if DOS is active.

EDIT: Updated 2nd December, 05:15 pm