click{{ Spectrum Utility Routines Compendium }}click
Contents
Any BASIC routines not already included in TAP files can be loaded using the TXT2Emu program which is also included in this archive.
Home

3DCK.TXT
** Transferring a 3DCK C64 .d64 file to a Spectrum .dsk file
Arrays.TXT
** Sorting an array
** Rotate a 3x3 array through 90 degrees
** Saving time populating large arrays
** Compact a string array
** What's the deal with hash tables, anyway?
Bitwise.TXT
** AND,XOR,OR,BIT,RES,SET,CPL,NEG,RLC,RRC,SLA,SRL,RL,RR,SRA for BASIC
** Bit operations in BASIC: AND,XOR,OR,BIT,RES,SET,CPL
** Simple BIT,RES,SET in BASIC
Compression.TXT
** Lempel-Ziv compression routine (draft)
** Lempel-Ziv compression routine (final)
** Lempel-Ziv compression concepts
DB1.TXT
** Kobrahsoft DB1 - getting it to work
Display.TXT
** Display file addressing; Screen slicing
** Addressing bottom 4 lines of display
Editing.TXT
** Joining & splitting BASIC lines
** Editing strings with INPUT LINE
** INKEY$: No Key / Any Key
** INKEY$: use with caution
** Changing the colour of the INPUT line
** INKEY$ timings
** Keyboard scanning routine
Errors.TXT
** ON ERROR ... REPEAT
** ON ERROR ... GO TO
** ON ERROR ... REPEAT ... all models
GOSUB+GOTO.TXT
** Locating the GO SUB stack
** Break from GO SUB (assembler version)
** Break from GO SUB (BASIC version)
** Enhanced RETURN (in BASIC)
** Passing parameters to subroutines
** CLEAR does not RESTORE the DATA pointer
** PUTRAM - Move RAMTOP without side effects
HowTo.TXT
** How To Write A Program
** A Miscellany of Dangerous Tips
** UNTIL ... DO and WHILE ... DO loops
** Pathfinding in Networks/Mazes
** Learning Z80 assembler - useful links
** Adding extra commands to BASIC
** Renumbering routines
** Detecting the ZX Interface 1 ROM version
** Paging memory on the 48k Spectrum
** Converting .Z80 to .TAP
** Countdown Timer
** Calculate the BEEP pitch
** Get the starting address of a game
** A painter (enclose & fill) routine
** Check if two rectangles intersect
Jelly-Vision.TXT
** Jelly-Vision!
Mcode_Parameters.TXT
** Passing parameters to machine code
** Assembler listings with OpCodes in a distinct column
** Timing calculator extension to Z80 OpCodes spreadsheet
** BASIC commands which can include a USR call
** Machine code optimisation
Numbers.TXT
** Testing recursive functions
** Number base 2 through 10 conversion
** Number base 10 to 2 conversion
** Number base 2 through 36 conversion
** Calculating percentages
** Updating BASIC variables from assembler
** Unravelling the Spectrum's floating point number format
** Exponentiation of negative numbers
** Using the ROM's FP calculator's memory area
** Calculating an expression to give a target number
** Z80 math routines
** Full 16*16-digit BASIC multiplication
** Print a large binary integer as a decimal
Plus128.TXT
** Switching 48k/128k modes within a BASIC program
** A 128k routine to put tokens in strings
** Which 128k Spectrum is this?
** How to check the whole memory on a +2 grey
** Problem with PRINT #stream on +128k
** BEEP durations and PLAY equivalents
** Spectrum 128k programming tutorials
** Editing shortcut keys for the Spectrum 128k
Plus3.TXT
** +3 CAT to string
** +3 BASIC DOS_Demo
** File comparator
** 128k+3 RAM paging from BASIC
** +3e Streams & Channels
** RAM used by +3DOS
** Running the +3 self-test program without the magic word
** +3e Load & Run from assembler
** Converting commercial disk games to use standard BASIC loaders
Printing_Graphics.TXT
** Drawing perspective grids in BASIC
** More on storing mazes (Genesis of BOB)
** BOB the Screen Builder
** Overlaid square grid
** Increasing the number of UDGs
** Extracting pictures from GAC & PAWS
** Make 8x UDGs from attribute blocks
** Drawing UDGs at different scales
** Scrolling a map
** Scroll one column
** Plot coordinates for Spectrum character set
** Graphics Extractor
** Simple horizontal scroll
** Drawing ellipses
** Vertical downward character WrapScroll
** UDG collision detection
** Sprites in +3 BASIC
** GUI in Sinclair BASIC
** 3D line drawing
** Large sprites
** Machine code sprites and graphics for the ZX Spectrum
** Plotting and rotating wireframe graphics
** Revealing a hidden picture
** Fractal graphics
** Plotting in the lower screen
** Colour clash comments
** Erasing the screen
** Next pixel down
** Mini scroll routine
** Using SCREEN$ from assembler
** Colour considerations when plotting from assembler
** Plotting an energy bar
** Scrolling by 2 pixels
Printing_Text.TXT
** Number Padding Function
** Procrustean Printing
** Printing text with condensed print controls
** Printing 64 column text from BASIC
** A neat little BASIC trick for TALL letters
** Proportional Print Routine
** Printing a listing
** Printing text at any position/size
QuickCopy.TXT
** Quick BASIC RAM copy
** Writing Faster BASIC
RAMdisk.TXT
** RAMdisk functions
Random.TXT
** Constraining a list of RND numbers
** RND commands
** Using RND in machine code
** Some alternatives to RND
** Random point screen fill
Relocating_Mcode.TXT
** Relocating machine code
** Getting PC into HL
ROM.TXT
** Which BASIC commands/functions affect FRAMES?
** System Flag Variables
** The $028e KEY_SCAN routine
** Spectrum 48k ROM routines
SaveLoad.TXT
** SAVE-ing SCREEN$ & BASIC as one file
** SAVE-ing without waiting for a keypress
** LOAD-ing without displaying the filename
** Saving BASIC programs in a stack
** Using the ROM's tape routines from assembler
** Force Auto-RUN after LOAD
** Using MERGE in a BASIC program
** Recovering BASIC from a faulty tape
** Why no 'Avalon' loading screen?
Space.TXT
** Calculating free memory
** How much space does a number take?
** Making Room
** Unused RAM check
** Calculating FN memory usage
Storing_Mcode.TXT
** Storing machine code in a BASIC program
** Inserting binary code into ZX Spin assembler
** Embedding/Concealing static data in BASIC
** Insert a REM of a given length into a BASIC program
Strings.TXT
** String DEF FNs
** Find-Fill-Copy functions for BASIC
** Bytes to String
** Screen2String
** STR$ bug fix
** SCREEN$ bug fix
TAP2DSK.TXT
** Converting programs from TAP to DSK
** Converting bootstrap loaders to standard loaders
TXT2EMU.TXT
** TXT2EMU (load BASIC text into an emulator)
** TXT2EMU truncate REM enhancement
Validation.TXT
** Input Validation
Variables.TXT
** Finding a variable in VARS
** Indirect Variable Assignment
** Undefine function
** Using the DEFADD area for extra variables
** DumpVARS (listing variables during runtime)