HEADER.BT

Author(s): Nazir Pashtoon
Publication: Nite-Times News
Pub Details: Nite-Times News v5 n2 (Volume 5, Issue 2)
Date: March - April 1991
Pages: 9
  10 REM <PROGRS. HEADER READER>
20 REM NAP AUG.,10,1984
30 INK 7: POKE 23658,0: CLEAR 32764
40 LET j=32765: LET head=j+45
50 DEF FN g(x)=PEEK x+256*PEEK (x+1)
60 RESTORE
70 FOR n=0 TO 44: READ code
80 POKE (j+N),code: NEXT n
90 DATA 62,0,55,221,33,42,128,17,17,0,243,245,219,255,203,255,211,255,219,244,50,41,128,62,1,211,244,241,205,252,0,58,41,128,211,244,219,255,203,191,211,255,251,201,0
100 CLS
110 POKE head,4
120 PRINT AT 18,8;"start the tape"
130 RANDOMIZE USR j
140 CLS : LET hdtype=PEEK head
150 IF hdtype=4 THEN GO TO 1000
160 LET h$=""
170 FOR n=1 TO 10
180 LET h$=h$+CHR$ PEEK (head+n)
190 NEXT n
200 PRINT "Prog. Name > ";h$: PRINT : PRINT
205 LET a=head
210 LET hdlen=FN g(a+11): LET hdadr=FN g(a+13): LET hdvars=FN g(a+15)
220 LET vars=hdlen-hdvars
230 IF hdtype THEN GO SUB 500: GO TO 1010
300 PRINT "Program is in BASIC": PRINT
310 PRINT "Program area >";hdvars;" bytes": PRINT
320 PRINT "Variables area >";vars;" bytes": PRINT
330 IF hdadr>10000 THEN PRINT "There is no autostart !": GO TO 1010
340 PRINT "Line # for autostart >";hdadr: GO TO 1010
500 LET b$=""
510 IF hdtype=1 THEN LET b$="Number array"
520 IF hdtype=2 THEN LET b$="Character array"
521 IF hdtype=3 THEN LET b$="Machine Code file"
530 PRINT "Program is a ";b$: PRINT
540 IF hdtype=3 THEN PRINT "Binary code ,start adr >";hdadr: PRINT
550 PRINT "Block length is >";hdlen;" bytes"
560 RETURN
1000 PRINT FLASH 1;AT 18,8;" This is not a tape header"
1010 PRINT FLASH 0;AT 19,1;"Are you game for another try ?(y/n)"
1020 PAUSE 0: IF INKEY$="y" THEN GO TO 100
1030 STOP
9992 RANDOMIZE USR 100: SAVE "HEADER.BT" LINE 1
9998 RANDOMIZE USR 100: LOAD "L.B1"

This program is part of the LogiCall ensemble on Disk #1 and can also be downloaded from our BBS.

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.