SPECTRUM RAMDISK PROGRAM BY J.G.HARSTON ======================================= VERSION 1.00, 16 JUNE 1986, 5:50PM Provides a 30K RAM disk in memory from 32768 to 62999. Load with the following: CLEAR 32767:LOAD "RamDisk"CODE:LET FS=63000 All RAM disk commands are prefixed with 'RANDOMISE USR FS' with FS set to 63000. The RAM disk starts at 32768 and works upwards in memory to 62999. Files are stored in alphabetical order, and the disk is compacted whenever a file is deleted. RANDOMISE USR FS:FORMAT "name" ------------------------------ Formats the RAM disk by blanking it out and sets the disk name. The RAM disk must be formatted before use. RANDOMISE USR FS:SAVE "name"[options] -------------------------------------- Save data to the RAM disk. The standard file options can be used, eg 'SCREEN$', 'CODE start,length', etc. If a file already exists with the specified name a 'File exists' error will be given unless option 2 is set, when it will be silently overwritten. If there isn't enough space to save the file a 'Disk full' error will be given. RANDOMISE USR FS:LOAD "name"[options] ------------------------------------- Load data from the RAM disk. The standard file options can be used, eg 'SCREEN$', 'CODE start,length', etc. If the file does not exist a 'File not found' error will be given. If the filetypes do not match a 'Type mismatch' error will be given. RANDOMISE USR FS:VERIFY "name"[options] --------------------------------------- Verifies data. RANDOMISE USR FS:MERGE "name" ----------------------------- Merges data RANDOMISE USR FS:CAT -------------------- This catalogs the RAM disk listing the files present. The catalog displays the disk name and free space followed by the files in alphabetical order, as in the following example: RAMDISK (00) 23K free Option 0 (Off) Demo L Intro If a file is locked to prevent deletion, it will be followed by a 'L'. RANDOMISE USR FS:PRINT "name" ----------------------------- This prints full information on the specified file in the form Filename TT LLLL SSSS EEEE L TT is the filetype 0=Basic, 1=Character data, 2=Number data, 3=Code. LLLL is the file length, SSSS is the file start, EEEE is the extra field. RANDOMISE USR FS:LIST --------------------- This lists the RAM disk by displaying full information on all the files, for instance: RAMDISK (00) 23K free Option 0 (Off) Demo 00 02AF 000A 02AF L Intro 03 1B00 4000 4000 L RANDOMISE USR FS:MOVE "name","name" ----------------------------------- The renames a file from the first name to the second name. RANDOMISE USR FS:ERASE "name" ----------------------------- This deletes the specified file. If the file is locked, a 'File locked' error will be given. RANDOMISE USR FS:REM A "name" [L] --------------------------------- This locks or unlocks the specified file. RANDOMISE USR FS:INPUT opt,num ------------------------------ Sets various options: Option 0 - Sets options 1, 2 and 3 to zero Option 1 - Display file information. If set to zero, no file information is displayed. If set to 1, then file information is displayed on LOAD, SAVE and ERASE. Option 2 - If b0=0 then SAVE does not overwrite files. If b0=1 then SAVE overwrites files. If b7=0 then SAVEd files are not locked. If b7=1 then SAVEd files are automatically locked. Option 3 - Sets error handling: 0 = errors stop the program and return via ERR_SP 1 = errors are displayed, and the program continues 2 = errors are ignored totally, and the program continues Option 4 - Set disk option. RANDOMISE USR FS:RUN -------------------- Not implemented, ignored RANDOMISE USR FS:OPEN -------------------- Not implemented, ignored RANDOMISE USR FS:CLOSE -------------------- Not implemented, ignored RANDOMISE USR FS:REM (C) ------------------------ Displays a copyright and version string.