|★ APPLICATIONS ★ UTILITAIRES RSX/LIGNE DE COMMANDE ★ INSTANT ACCESS ★|
|INSTANT ACCESS (Computing with the Amstrad)||INSTANT ACCESS (Amstrad Action)||INSTANT ACCESS (CPC Magazin)|
Extra commands speed production of DIY databases IAN SHARPE reviews a useful adjunct to Locomotive Basic
IAN SHARPE reviews a useful adjunct to Locomotive Basic
INSTANT Access is designed to add random access disc -1 filing and other useful facilities to Locomotive Basic. It takes up about 10k of memory and provides 36 new RSX commands which fall into five main groups. These are summarised in Table I.
Amsdos - the Amstrad Disc Operating System - behaves in a similar way to the cassette system. It maintains compatibility between disc and tape based machines but fails to exploit the full potential of disc filing. The main problem is that Amsdos only supports sequential files.
Let's assume you had written a database which stored all your information on disc and you wanted to read a record part-way through. The only way to do it under Amsdos is to open the file and read all the records sequentially until you reach the one you want, just as if you were using cassette. It's like trying to look up Sharpe in a telephone directory by starting at the beginning and reading every name.
This is a slow process and you would probably only write a database in Locomotive Basic if the data were small enough to fit in memory. You would then read all the data into ram, manipulate it there and write all it back to disc at the end of a session.
This problem doesn't occur under CP/M, which lets you go straight to any part of a file and access it without having to load unwanted records. You can't alter the record as quickly as if it had been in memory, but the size of your database is only restricted by the amount of information you can get on a disc.
This is one of the strengths of Mallard Basic supplied with the PCWs and available for the CPCs - at a price.
The file pointer, as you may guess from the name, is a variable that holds the position in the random access file where the next piece of data will be written to or read from.
Included under the heading of general disc commands are those to set the default drive or user group, format particular tracks on a disc, load and save binary files without the need for a buffer, check for the existence of a file and dump a file to the screen.
The format option will let you specify the sector numbers to be used in formatting. These are used by Amsdos and CP/M to decide (among other things) what type of format a disc is.
If they come across numbers that don't fit in with one of the standard types such as data format, they will stop with an error message.
The use of non-standard numbering on empty tracks of an otherwise normally formatted disc will prevent copying with Disckit but not one of the more sophisticated copiers.
Sector editing commands allow you to write your own disc utilities in Basic. A sector can be loaded into a buffer, individual bytes peeked and poked and the amended sector written back to disc. These could form the basis of a directory editor or program to recover files from faulty discs.
Seven commands are devoted to providing a greatly enhanced line editor which replaces INPUT and LINE INPUT from the keyboard. A string is filled with characters to the same length as the maximum number you want to allow in the input field and |EDIT,@string,x,y will present it for editing at the specified position.
Spaces are shown as graphics characters which indicate the extent of allowable cursor movement. Control + R toggles between overtype and insert modes (why not Basic's Control + Tab?), the Clr and Del keys behave as expected and Control+W wipes the line.
The input field wraps round at the right hand edge of the window, so if a window is defined to contain the same number of characters as the input string you can edit a box rather than a single line.
For applications where it's desirable to move the cursor from field to field the character codes that exit the editor - maybe the ones generated by Control +cursor keys - can be specified. Another RSX returns the character that caused the editor to terminate, so it is easy to program these effects.
The final group concentrates on error handling, mainly relevant to those generated by the utilities.
A telephone directory program is included on the disc which serves as a good example of how to write a simple database using this package.
The 31-page manual details each command and should not present any problems to an average Basic programmer. It also provides a line by line explanation of how the example program works.
Instant Access is a genuinely useful package, ideally suited to writing databases and disc utilites in Basic. If you are on the lookout for a product to provide an alternative means of handling files I can certainly recommend this one, though I would quibble with the price. £29.95 seems a little over the odds for 10k of code, no matter how useful.
L'alinéa 8 de l'article L122-5 du Code de la propriété intellectuelle explique que « Lorsque l'œuvre a été divulguée, l'auteur ne peut interdire la reproduction d'une œuvre et sa représentation effectuées à des fins de conservation ou destinées à préserver les conditions de sa consultation à des fins de recherche ou détudes privées par des particuliers, dans les locaux de l'établissement et sur des terminaux dédiés par des bibliothèques accessibles au public, par des musées ou par des services d'archives, sous réserve que ceux-ci ne recherchent aucun avantage économique ou commercial ». Pas de problème donc pour nous!
CPCrulez[Content Management System] v8.7-desktop/c
L'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko.