by R. Lussier & SUM Mag.
Loading a program into the 2068 is always divided into two parts, the Header and then the program or bytes or array.
R-HEADER reads the header without loading the program. The header contains the following information:
(1) Program type (Basic, code, and array)
(2) Name
(3) Length with & without variables
(4) Auto-Run line (Basic)
(5) Byte Origin (Code)
Type in the listing & save it before RUNning. Then RUN, and follow instructions. The program will list contents of any header it encounters from tape.
1 REM R-HEADER 2068
2 CLEAR 31999
5 BORDER 0: PAPER 0: BRIGHT 1: INK 5: CLS
10 GO SUB 1000
50 CLS : GO SUB 600: BEEP .01,10: PRINT AT 10,9; INK 0; PAPER 6; FLASH 1;"START CASSETTE"
60 RANDOMIZE USR 32000
65 BEEP .01,45
69 CLS : GO SUB 600
70 LET ix=32256
80 LET type=PEEK ix
90 PRINT INVERSE 1'("Program:" AND type=0)+("Numeric Array:" AND type=1)+("String Array:" AND type=2)+("Bytes Block:" AND type=3);
100 PRINT INVERSE 0;" ";: FOR n=ix+1 TO ix+10: PRINT CHR$ PEEK n;: NEXT n
110 PRINT INVERSE 1''+("Prog.+Variable " AND type=0)+("Code " AND type);" Length:";
120 PRINT INVERSE 0;" ";PEEK (ix+11)+256*PEEK (ix+12)
130 IF type=1 OR type=2 THEN PRINT INVERSE 1'"Variable:";: PRINT INVERSE 0;" ";CHR$ (PEEK (ix+14)-32-64*(PEEK (ix+14)>192))+("$" AND type=2): GO TO 175
140 PRINT ': PRINT INVERSE 1;("Auto-Run Line:" AND type=0)+("Block Origin:" AND type=3);
150 PRINT INVERSE 0;" ";PEEK (ix+13)+256*PEEK (ix+14)
155 IF type=3 THEN GO TO 175
160 PRINT INVERSE 1'("Program Length:" AND type=0);
170 PRINT INVERSE 0;" ";PEEK (ix+15)+256*PEEK (ix+16)
175 PRINT ''' OVER 1;"................................"
180 PRINT '' OVER 1;" S: STOP ENTER: CONTINUE ": PAUSE 0: IF INKEY$="s" OR INKEY$="S" THEN STOP
190 RUN
600 PLOT 0,0: DRAW 255,0: DRAW 0,175: DRAW -255,0: DRAW 0,-175: PRINT INVERSE 1;AT 0,9;"R-HEADER 2068";AT 1,9;" GAGNON-© 85 "''
610 RETURN
1000 REM ----------the M.C.
1010 DATA 221,33,0,126,175,17,17,0,55,1,254,254,205,153,100,205,252,0,186,32,240,219,255,203,191,211,255,175,211,244,201
1020 FOR I=32000 TO 32030: READ A: POKE I,A: NEXT I
1030 RETURN
9991 SAVE "lect2068" LINE 1: VERIFY "lect2068"
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.