INSTANT ACCESS (Computing with the Amstrad)INSTANT ACCESS (Amstrad Action)INSTANT ACCESS (Popular Computing Weekly)INSTANT ACCESS (CPC Magazin)
★ Ce texte vous est présenté dans sa version originale ★ 
 ★ This text is presented to you in its original version ★ 
 ★ Este texto se presenta en su versión original ★ 
 ★ Dieser Text wird in seiner Originalfassung präsentiert ★ 

Extra commands speed production of DIY databases

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.

Random access
CREATE Creates random access file.
OPEN Opens random access file.
CLOSE Closes current file.
INPUT Inputs from file.
GFILE Gets status about current file.
GPTR Gets current random access pointer.
GFSIZE Gets size of current file.
OFFSET Sets origin for random access pointer.
PRINT Sends string to file
PTR Sets absolute position of random access pointer.
PTRR Sets relative position.

General disc
DDRIVE Sets default drive.
DUMP Dumps file to screen.
DUSER Sets default user group.
FEXIST Checks existence of file.
FORMAT Foramts specified track.
LOAD Loads binary without buffer.
SAVE Saves binary file whithout buffer.

Sector editing
ROSEC Reads specified sector into buffer.
SPEEK Peeks byte in the buffer.
SPOKE Pokes byte in the buffer.
WRSEC Writes sector to disc.

Basic enhancement
EDIT Edits string.
EPAR Sets editor parameters.
EXEC Executes specified Basic commands.
GKEY Gets editor exit character,
GPOS Gets last editor cursor position.
GVER Gets version of Basic.
SPOS Sets cursor start position in editor.

Error handling
ERROFF Disables BIOS error messages.
EPRON Enables BIOS error messages.
GERR Gets error/line number for last error.
HELP Displays available commands.
ONERR Defines action on utility error.
REPORT Displays last error message.
RETRY Sets number of retrys disc makes for failed operation before generating error.

Random access is catered for by 11 RSXs which let you create, open and close random access files, input and output strings, move the file pointer to any location - either relative or absolute, obtain the pointer value and information about the current file.

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.


★ PUBLISHER: Minerva Systems
★ YEAR: 1986
★ CONFIG: 64K ( All CPCs with disk drives )
★ AUTHOR(S): ???
★ PRICE: £29.95


Je participe au site:
» Vous avez des infos personnel, des fichiers que nous ne possédons pas concernent ce programme ?
» Vous avez remarqué une erreur dans ce texte ?
» Aidez-nous à améliorer cette page : en nous contactant via le forum ou par email.
★ AMSTRAD CPC ★ A voir aussi sur CPCrulez , les sujets suivants pourront vous intéresser...

» Applications » RSX Variables List
» Applications » RSX - 3D Characters (Amstrad Action)
» Applications » Pride Utilities - System X
» Applications » Rsx - Mix Your Modes (Popular Computing Weekly)
» Applications » RSX Keywords
» Applications » RSX Clearstack (Schneider Aktiv)


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
Page créée en 215 millisecondes et consultée 1668 fois

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.