%OP%TM1 %OP%BM1 %OP%LM5 %OP%HE/%H2%Z88 Users' Club Software Library%H2%/ %OP%FO/%H2%Z163%H2%//@P@/ %CO:A,12,70%%C%%H1%%H2%EPmgr.doc%H2%%H1% It is not only their extortionate price that makes EPROMs a valuable storage medium for computers: they have the great advantages over other media of easy portability and being stunningly fast to access. Unfortunately the EPROM management functions built into the Z88 do not allow full advantage to be made of these features. In particular, EPROMs can only be read in Slot 3 and BASIC programs have to be fetched into RAM before they can be run. In addition, no information as to the amount of space available on an EPROM is given, it is not possible to recover erased files or to check if an EPROM has been properly erased. "EPmgr" seeks to make good these deficiencies by providing a number of additional EPROM management commands. After fetching "Z163B" and "Z163C" into RAM enter BASIC and CHAIN "LIBRARY/Z163B". This will check that you have an expanded Z88 (i.e. one with at least 128k RAM in slot 1) and then load "Z163C" into the space above &B000. You will then be presented with three windows: a) a commands window b) an Information window where you will initially be told about the number of files on the current EPROM and the amount of space used and remaining free, and where you will be asked for the file identification letters for files to be fetched or chained etc. Once you start fetching or chaining files the status information will be overwritten, but because of the speed with which "EPmgr" catalogues an EPROM, simply swapping slot and back (type SS) or swapping mode and back (type MM) provides a satisfactory way of recovering this information if it is required. c) a catalogue window giving the names of up to 21 files on the current EPROM. To access commands either move the cursor over the desired command and press or type the letter given below: 1)FETCH FILE (F or f) This fetches a file from the EPROM to RAM either under its current name or another if so desired. There is a limit of 32k on the length of files that can be fetched using EPmgr.v1. 2) CHECK EPROM (X or x) This command enables you to check that all the bytes of an EPROM have been restored to &FF by exposure to ultraviolet light. As the light source ages, or if their is dust in the EPROM complete erasure may not be achieved by a single exposure cycle so this check can be useful. You will have to give the number of the slot the EPROM to be checked is in and its size. With the larger EPROMS (256k and above) the information as to the status of each 16k bank will be given in batches of 8 separated by Page Waits. If the EPROM has already been examined by the Filer it will have a header blown into its last 64 bytes. On completion of this command the Information window will read this header and either give the size of the EPROM if a header is present or give a "No Eprom" message if the EPROM has not be examined by the Filer. Applications have a slightly different header so this will be read as "No Eprom" but the Check Eprom command can be used to discover how much space has been used in writing the Application. %P0% 3) NEXT MODE (M or m) Files held on EPROM are only erased when the whole EPROM is erased but if a second file of the same name as one already on an EPROM is saved the first file has the first letter of its name changed from "/" to "0" and it is then ignored by the Z88 cataloguer. It is occasionally useful to be able to recover an "erased" file, but would unnecessarily clutter the screen to have them present on the default screen. This command gives you access to all such files on an EPROM so that they can be fetched or chained. 4)SWAP SLOT (S or s) This command toggles you between slots 2 and 3 5)QUIT (Q or q) This clears the screen. It does %H1%not%H1% restore HIMEM to &C000, but leaves it at &B000. This is because the CLI command that ought to make this possible does not work when called from the segment in which "EPmgr" runs. Blame the operating system, not me! 6)CHAIN (C or c) This is the raison d'etre of "EPmgr" in that it allows you to run a BASIC program without having to waste time and computer memory fetching it into RAM first. It simply puts it into the space at the start of the instantiation of BASIC in which "EPmgr" is running and then QUITs "EPmgr" so that you merely have to type "RUN " to get going. (Again, that this cannot be done using the CLI from "EPmgr" is not my fault). It is necessary, though, that the program defines LOMEM as this procedure bypasses the normal LOAD or CHAIN procedure and therefore Z88 BASIC does ot know where to set TOP and hence does not know where to store its variables. If the program does not define LOMEM you will get a "LOMEM NOT DEFINED" warning and will be asked if you want to proceed or not. In the case of Richard Russel's BASIC Patch it is safe to proceed (you will have to type "HIMEM=&C000:RUN " to run it successfully) and you can run programs successfully if they are shorter than the last program to be run in that instantiation of BASIC, but it is safest to have the programs you want to CHAIN using "EPmgr" define LOMEM. To do this follow this procedure (which is as nearly foolproof as the inventiveness of human folly permits): a)Load the program into BASIC in the conventional way (i.e. not using "EPmgr"'s CHAIN command) and type in "PRINT TOP-PAGE" and remember the value this gives e.g 10869 b)Write a new line "1 LOMEM=PAGE+10869" (or whatever the value is) [note, you need to define LOMEM at the start of the program] c) as this new line will of course add a few bytes to the length of the program repeat the "PRINT TOP-PAGE" and ammend the line 1 to the new value. d) save the ammended program to EPROM and it is ready to be CHAINED using "EPmgr". [Note the check "EPmgr" does for LOMEM being defined consists simply of looking for the token for LOMEM followed immediately by an "=" sign. Thus "LOMEM =PAGE+10869" will not be read by "EPmgr" as a definition of LOMEM though it will in fact work O.K and if there is a line 15826 or a line between 53760 and 54015 which begins with an "=" sign these will be read as defining LOMEM, but in practice this should not be a problem). 7)SCREEN DOWN () This gives you access to the next batch of file names if there are more than 21 files on the EPROM in the current mode. The information window will tell you you are on Screen B,C,D or as appropriate. 8)SCREEN UP () This returns you to the previous batch of 21 files after use of the previous command. %H1%ADVANCED "EPmgr" COMMANDS 9)CUSTOMISING THE FILE IDENTIFICATION LETTERS By default "EPmgr" identifies the first file in a batch of 21 as A, the next as B etc through to U. If you save to the EPROM a plain-text file which consists of 21 printable characters (it will catalogue as 22 bytes) and which is titled LA for the first 21 files, LB for those on screen B etc. these letters will be used instead. Thus you can chain "list-comp" by typing CL if you set up the relevant file correctly and so use "EPmgr" to provide you with an Application-like access to BASIC programs. If you wish to change the letters simply save a second L- file, or, to return to the default letters, save one of the same name but other than 22 bytes long. The L- file does %H1%not%H1% need to appear on the screen the letters of which it defines. 10)DIAMOND FETCH (<>F or <>f) This command will give you the list of 21 file identification letters for the files currently on the screen. This list can be edited. Then, by pressing , the program will give you each file name in turn to be edited or fetched as it is. You can skip a file in the list by typing and files longer than 32k will be skipped automatically. 11)DIAMOND CHAIN (<>C or <>c) This enables you to chain more than one program into the same instantiation of BASIC - e.g a BASIC program and a machine code routine that is used by it. Unfortunately, because of the way the BASIC Patch works it is not possible to chain both it and a program which uses, say, its graphics function in together. You will have to specify the address at which "EPmgr" should load each program. (It is assumed that programs will be loaded at the start of a Page so only the most significant byte of the address need be entered - e.g 23 for the address &2300 - values lower than &2300 or higher than &AF00 wil give a "Bad value" error message - press any key other than to enter a valid value). The limit of &AF00 is to stop you overwriting EPmgr's machine code, but if you try to Chain a program longer than the space available between the start address and &B000 you will not be stopped from doing this.(This shortcoming will be removed in .v2).At the end of this procedure "EPmgr" will be QUIT in the usual way and you then have to type in RUN to start the program loaded at &2300 or, by specifying the value of PAGE, whichever program you choose. For the sake of speed "EPmgr" uses the space from &9B00 to &B000 when cataloguing the EPROM (i.e. when swapping slot,mode or screen) so do not load programs into addresses above &9B00 and then use any of these commands or the program will be overwritten by the catalogue.) N.B. Both Diamond commands can be accessed by placing the cursor over the command and pressing DIAMOND. %H1%ACCESSING "EPmgr"%H1% from other programs: If HIMEM is left at &B000 it is possible to return to "EPmgr" without having to re-CHAIN it by CALLing &B000. %P0% If, say at the end of a program, you wish to return to EPMGR then it is advisable to use the *CLI CALL&B000~E command used by "EPmgr" itself to access its machine code as this means that when "EPmgr" is QUIT it will return to the beginning of any new program. If you simply have a line which reads "CALL &B000" then QUIT will return to the point after that instruction which may well not be where you want to be and will at least give you a spurious error message. One apparent omission from "EPmgr" is a catalogue function, but the length of individual files is given at the time they are chained or fetched as well as information about total space used and free on the EPROM at start-up and given the semi-permanent nature of EPROM files a function to produce a list of names and file-lengths would waste bytes, particularly as a program to do this can, if required, be chained via "EPmgr". While "EPmgr" is on the screen the program will be called "EPmgr.v1" in the Index. If it is used to chain a program and that program does not use the *NAME function "EPmgr" will take the first 11 letters of the program's name and add an extension "/EP". If the program does use the *NAME function that name will be used once the program is RUN until "EPmgr" is returned to. (C) Richard P. Boam, The Old Post Office, Rusness, SANDAY, Orkney. KW17 2BP. %CO:B,12,60%%CO:C,12,48%%CO:D,12,36%%CO:E,12,24%%CO:F,12,12%