GO SUB

Short snippets of S*BASIC code, scripts, and programming aids

Most PE routines require EasyPtr's ptrmen_cde!

Cut these routines from the web page and paste them into your favourite QL editor..

Name Vers Description Remarks
Sprites and other PE Objects
txt2spr 0.02 Convert menu item text to sprite. Useful for drag'n drop? This version PE and GD2 only!
enRLE 0.01 Sprite compression. Routine to do standard SMSQ/E sprite compressions. Here with a harness to compress some solid GD2 sprites.
Bounce 0.01 Jumping ball demo. Simple, ready-to-run routine demos moving a semi-transparent sprite. Basis for a games routine? PE/GD2 only!
Programming Aids
CDBdefs 0.00 Channel Definition Block functions Requires Channel toolkit. Cut out the ones you need and paste them into your program.
ScrollED 08WB Scrollable line editor for inclusion in S*Basic programs GD2-compatible version. (The idea was to write this in assembler, but I never got round to it.) Download code here.
DeHex 0.01 Remove hex and binary literals from SBASIC programs. SBASIC only.
Files, Directories, and Directory Devices
DevGet 0.06 Given a device's USE name, return its real name (and vice versa) SMSQ/E & Qlib. Probably not relevant for Qdos.
DelDir 0.01 Demo and tutorial: Traversing a directory tree (bottom up) Commented S*Basic code to scan and DELETE a directory tree. (Nowadays Id do it differently ;o)
HDRen 0.03 Give your QXL.WIN-type hard disk a sensible name! For QPC, QXL and other systems that use the QLWA container HD
DirSize 0.01 Get the file count and size of a directory tree. Qmenu + SMSQ/E, or Qdos with DDL2 + tk2 + PE.
QLone 0.02 Clone a complete device or directory tree. SMSQ/E / Qdos with DDL2 + tk2.
NextFile 0.10 Get filenames from a directory one at a time as needed. SMSQ/E / Qdos with DDL2 + tk2.
FilesOpen 0.02 Find out how many open files there are on a device, - eg before dismounting it. SMSQ/E and SBASIC only, as it stands.
DirUp/DirDn 0.02 Functions to move up or down a directory level. SMSQ/E or (with slight modification) Qdos with DDL2 + tk2.
ParseFnm 0.05 Routine to split a filename into its components. S*BASIC for all systems with DDL2.
Experimental
SB Slave 0.02 Demo of how SBASIC can be used as a slave by another program Could be used in a QL browser?
Miscellaneous
Calendar 0.00 Template script to produce basic calendars View sample output or download code here
Kbdbtn 0.00 Button to change keyboard languages PE + Qmenu.
We should avoid duplication of effort, because that is being done by others
- Athur Mitchell (British industrialist)