MANUAL FOR UNZIP (BBC BASIC+ARM/6502 ASSEMBLER) This file describes the program UNZIP which opens and extracts the contents of a ZIP file into the currently selected directory. The manual and software are (C)1999 SPROW INSTRUCTIONS- At the BASIC prompt, type CHAIN"UNZIP" The program will then ask for the source filename of the ZIP file. Enter this. After some checks have been made on the ZIP file then the stored files will be unpacked to the currently selected directory, telling you also the date they were stored and their size. Files which weren't stored (ie. in some way compressed) or encrypted will be skipped over, and files can be optionally skipped by answering 'N' when prompted. If the locally computed checksum doesn't match the one read from the file then the file will be extracted anyway and a warning raised. KNOWN PROBLEMS/FUTURE ENHANCEMENTS- No known problems No name or directory truncation occurs, thus names and directories in the ZIP must be short enough to be supported by the target filing system. Assumes ADFS *CDIR command is available to create directories, this might not be the case. EXIT MESSAGES- File not found - the specified source file could not be opened Not a ZIP file - the specified start file did not start with the ZIP id Corrupt ZIP file - an invalid header was read from the ZIP file Not enough memory for extras field - the extras field exceeded 128 bytes Name longer than buffer - the filename and path exceeded 128 bytes Ignored attributes - a warning that the attributes were missing or not written on an Acorn, so will be set to &00001900 &FFFF8023 File may be corrupt! - the stored CRC did not match the one calculated when the data was extracted I cannot run this code - an attempt was made to run UNZIP on a non 6502/ARM Object in the way - when trying to create a directory, a file was found with the same name as the directory which was being created HISTORY- V1.06 Can optionally stop unzip extracting a file. Several other cosmetic changes. Files are extracted much faster due to use of OSGBPB instead of OSBGET V1.11 Added CRC calculator, recoded BGET for 32 bit words V1.12 Slightly altered the method for discovering which machine it's running on, improved error messages, made some (former) errors just warnings now. Full stops in filenames will be mapped to "/" as "." is a dir separator on Acorn machines V1.13 Bugfix to CRC code when the block to be CRC'd is an exact multiple of 256 bytes. Thanks to Ben Avison for that. V1.14 Added sketchy directory support, assumes ADFS *CDIR command exists. Enlarged name buffer to 128 and range check it too. V1.19 Can now choose to extract all files in a ZIP without prompting. ZIPs where the entire contents are within directories inside the ZIP do now have those top level directories created first.