64K QSAVE

Products: QSave
Date: 198x
Type: Program
Platform(s): TS 1000
Tags: Tape

Moves a block of machine code stored in a line 2 REM statement up into the 8K–16K memory area, then announces "64K QSAVE NOW LOADED". The name and the destination suggest it installs QSave fast-load cassette software on a TS1000 fitted with a 64K memory pack, where the 8K–16K block is RAM that BASIC leaves alone. The BASIC part is only a few lines; the work is done by the relocated code, which is not called from this program.

Found on an unlabeled tape. The tape holds the same program recorded twice, and the two recordings decode to identical listings.

Program Analysis

Program Structure

Line 2 is a long REM holding the machine code. Line 4 is SAVE "QSAVE", so a copy saved by running from that line autostarts at line 5 when loaded. Line 5 switches to FAST, lines 20–50 copy every byte from address 16514 (the first byte inside the line 2 REM) to 16950 down by 8214 bytes, which puts it at 8300–8736, and lines 80–90 print the confirmation message and stop.

Notable Techniques

  • The code is carried inside a REM statement, so it loads with the BASIC program and starts at the fixed address 16514.
  • The copy uses a plain FOR/NEXT loop of POKE (B-8214),PEEK B in FAST mode instead of a machine code block move.
  • Placing the SAVE inside the program gives a self-starting copy without using GOTO after loading.
  • The 8K–16K area only holds RAM on machines with a memory pack that fills it, such as a 64K pack. On a standard 16K machine the copy does nothing useful.

Related Products

LOAD/SAVE a full 16K in 29 seconds (16 times faster). QSAVE amplifier/filter unit plugs between recorder and computer. A data...

Related Content

Image Gallery

Source Code

   2 REM LN #4/LLN #4/#2 #▝6# RETURN2K£- LN 25# RETURN▘4 GOTO / GOTO PEEK  COPY- LN 25# RETURN▘C POKE LN ▀5#J RETURN#4STR$ TAN ▞ 5,,RND2 PEEK  COPY7LN ▀5#J#▄#STR$  FOR E=RND[B] GOSUB # FOR SGN COS / CONT LN ▀5- LN 25# RETURN▘C PLOT TAN  LPRINT LN ▀5LN ▀5#J[V]4▝: #▞ [B]C▞YVNOT Y=NOT TAN ▞▘5,,RND2 PEEK  COPY7LN ▀5#J▄## LET 5ATN [W]4/ INPUT - LN 25LN 25LN 25LN 25LN 25LN 25LN 25LN 25TAN Y <= RETURN*S RAND : £# RETURN[E]Y <= RETURN*ABS B5#CHR$ £ACS >TAN 5  7- LN [3]5# RETURN▝4 PRINT - COPYLN [S]5-#LN [3]55,,RND2 7##▄#LN [3]5STR$  FOR E=RND[B] GOSUB # FOR SGN C~~/ REM         LLIST #LN [3]5#LN [3]5#LN [3]5▞ #TAN Y▖PEEK  COPY▞)( RETURNTAN Y#<= RETURN▞)( RETURNTAN Y#<= RETURN▞R( RETURNTAN LN [S]5LN [S]5LN [S]5LN [S]5LN [S]5LN [S]5LN [S]5LN [S]5TAN [B]ACS >S▛LN [$]5LN ▜5TAN LN [-]5LN ▜5TAN 5K#7##LN [3]5# RETURN▟4 PRINT # RETURN 4 LIST TAN LN 7?##4LN 7?##4LN 7?#T5STR$  FOR E=RND[B] GOSUB # FOR SGN ASN SQR 4# LET 4#LN #?ABS [A]▀0PEEK  COPY##4E=RND[B] GOSUB # FOR SGN COS #[O]4   ...................................................................
   3 REM 
   4 SAVE "QSAV[E]"
   5 FAST
  20 FOR B=16514 TO 16950
  30 POKE (B-8214),PEEK B
  50 NEXT B
  80 PRINT AT 10,5;"64K QSAVE NOW LOADED"
  90 STOP

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