Header

Date: 198x
Type: Program
Platform(s): TS 2068

Program header reader; for creating directory of programs on a cassette.

Appears on

Library tape from the Sinclair Computer Users Society (SINCUS).

Source Code

   10 CLEAR 32767
   20 FOR j=32768 TO 32794
   30 READ k
   40 POKE j,k
   50 NEXT j
   60 DATA 243,62,128,211,255,62,1,211,244,62,0,221,33,32,128,55,205,252,0,62,0,211,255,211,244,251,201
   70 REM The DATA Statement Contains The Machine code ;          8000 DI           ;Disable Int. 8001 LD   A,80    ;\\            8003 OUT  (FF),A  ; \\Switch To  8005 LD   A,01    ; /Extension  8007 OUT  (F4),A  ;/ ROM        8009 LD   A,00    ;LOAD Header  800B LD   IX,8020 ;LOAD It Here 800F SCF          ;LOAD Flag    8010 CALL 00FC    ;LOAD Routine 8013 LD   A,00    ;\\            8015 OUT  (FF),A  ; *Restore    8017 OUT  (F4),A  ;/ Home ROM   8019 EI           ;Enable Int.  801A RET          ;All Done              
  100 CLS 
  110 PRINT AT 10,5;"Program Header Display"
  120 PRINT AT 12,0;"Start The Tape And Press Any Key"
  130 IF INKEY$="" THEN GO TO 130
  140 CLS 
  150 RANDOMIZE USR 32768: POKE 23692,2
  160 IF PEEK 32800=0 THEN PRINT "Program: ";
  170 IF PEEK 32800=1 THEN PRINT "Number array: ";
  180 IF PEEK 32800=2 THEN PRINT "Character array: ";
  190 IF PEEK 32800=3 THEN PRINT "Bytes: ";
  200 LET mark=0: PRINT """";
  210 FOR j=32810 TO 32801 STEP -1
  220 IF PEEK j<>32 THEN IF mark=0 THEN LET mark=j
  230 NEXT j
  240 FOR j=32801 TO mark: PRINT CHR$ PEEK j;: NEXT j
  245 PRINT """";
  250 IF PEEK 32800=0 THEN IF PEEK 32813+256*PEEK 32814<9999 THEN PRINT " LINE ";PEEK 32813+256*PEEK 32814;
  255 IF PEEK 32800=1 THEN PRINT " ";CHR$ (PEEK 32814-64);"(";(PEEK 32811+256*PEEK 32812-3)/5;")";
  260 IF PEEK 32800=3 THEN PRINT " ";PEEK 32813+256*PEEK 32814;",";PEEK 32811+256*PEEK 32812;
  265 IF PEEK 32800=2 THEN PRINT " ";CHR$ (PEEK 32814-128);"$(";PEEK 32811+256*PEEK 32812-3;")";
  270 PAUSE 150: PRINT ""
  280 GO TO 150
 9999 SAVE "HEADER": BEEP 1,32

People

No people associated with this content.

Scroll to Top