As a teacher who has been working in the field of microcomputers for some 7 years, and an owner of an Amstrad 6128 since their introduction, I would firstly like to say that I find this machine to be very good value for money, and a computer I recommend highly to my students. However, I have always felt that Amsdos has one or two omissions without which the disc drives are not much better than high speed cassettes. Perhaps the most serious of these is the lack of random access files. Here is a lisi of my program 'RANFILE" which is an attempt to remedy this situation, a Basic program to generate the binary file "RANFILE.BIN". The program resides at &9000 and is loaded as. follows: MEMORY &8FFF LOAD"ranfile.bin" CALL &9000 There after the program can be invoked via 5 RSX commands. These are:
- |OPENRAN,"filename" - this command opens a 32k file of the given name for use. Data in the file is not lost and if the file docs not exist it will be created. Note that a file extension is not required - indeed, if one is supplied, it will be overwritten with the file extension RAN
- |FIELD,x - this command divides the file inlo 'fields'of a size x. The value of x must be a factor of 512, ie. 1,2,4,8,16...512 so that there is an integral number of fields per sector.
- |PUT,string,x - this command puts the string into field x. Note that the length of the string should be of the length given in the field command, padded as required.
- |GET,stringvar,x - this command gets the string from field x. Note that the length of the string should be preset to the length given in the field command.
- |CLOSERAN - this will save the last PUT data to disc and tidy up the 'house -keeping'. Note that the file name can be given if desired, but is not necessary.
I have incorporated some error trapping into the routine, so that common errors such as FIELDing an unOPENed file, or CETling from an unFIELDed file, for example, can be trapped, as can using the wrong number of parameters.TAU ★ AMSTRAD CPC ★ DOWNLOAD ★ |
CPCrulez[Content Management System] v8.7-desktop/c Page créée en 715 millisecondes et consultée 1468 foisL'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. |
|
|
|