Eleven New Commands For the CPC464|The Amstrad User)Applications Utilitaires Rsx/ligne De Commande
★ 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 ★ 

The idea for this program came from an English publication, 'Home Computing Weekly', which published a similar program which was designed to run on a tape based CPC464 but was not relocatable. This meant that if you had added any goodies like a disc drive or speech synthesiser or any peripheral which resets the top of memory address, then the program would not work.

I was faced wilh this problem having installed a disc drive, and after considering altering the program to run at the disc system top of memory. 1 decided that it would be just as easy and much more useful to write a completely new program which would be relocatable. The following program is the result.

To use the new BASIC commands, they must be preceded by the bar symbol (shift @). just like any other external command. The new graphics commands are:

  • |MOVE
  • |MOVER
  • |PLOT
  • |PLOTR
  • |DRAW
  • |DRAWR
These differ from the standard commands in that they are able to set both the graphics write mode and pen colours directly. They do this by using the parameters which arc passed to the RSX with the command. The format for these commands is:

|COMMAND,x,y,p,w The parameters "x" and "y" are the graphic x and y coordinates (or the x and y offsets in the case of the relative commands), "p" is the pen number and "w" the write mode. This can be any of the following:

  • 0 - Replace
  • 1 - XOR
  • 2 - AND
  • 3 - OR
The byte in memory- representing the current state of the addressed pixel is combined with the new information using the logic function specified by the write mode. Have a play with this by overwriting previous graphics, particularly using the XOR mode and observing the interesting effects. The other five commands are:
  • |FRAME
  • |DUMP
  • |LOAD
which I will deal with in order. As the name probably suggests. CLEARINPUT clears the input buffer. Use it to clear any accidentally entered characters before accepting single character input FRAME waits for the next frame flyback. Use it to give clean movements to your graphics. You can do this from BASIC simply by calling a firmware routine, but this instruction saves you having to remember the address (&BD19). Neither of these commands need any additional parameters - the remaining ones do. COPYCHR will copy a specified number of characters from the screen into a siring variable, starting at the current position of the text cursor and advancing the cursor as it does so. Before executing this command, you must set up a string variable containing x dummy characters, where x is the number of characters which you wish to copy. The command is then issued as:
  • |COPYCHR,@a$
where a$ is the string variable previously set up. For example, to copy 5 characters from screen position 1,5 and print them at screen position 1,10:
  • a$=''xxxxx' - sets up string variable
  • LOCATE 1,5 - positions cursor
  • |COPYCHR,@a$ - gets character into a$
  • LOCATE 1,10 - repositions the cursor
  • PRINT a$ - prints them
Of course, the string variable can have any legal name and the dummv characters may be anything you like they vvill be lost anyway. The last two commands are useful for saving and loading blocks of memory ai a continuous tape record. They must be executed as:
  • |DUMP,address, length
  • |LOAD,address, length
Both parameters must be supplied. Finally, we come to the program and how 10 get it up and running on your Amstrad.

first enter the program called POKERSX. then if you have a tape I system, put a cassette in and position | the tape ready for recording. Now RUN the program, and if all goes well the machine code will load and the program will then save it as RELOCODE.BIN. If you have made any mistakes in the DATA statements, the propram should tell you which line is at fault. You can then correct it and try again. Once you have RELOCODE safely  saved on tape , you may use it by including the short program GETRSX at the start of any of your programs in which you wish to use the new commands. You must, of course, make sure that there is a copy of RELOCODE on tape immediately following your program for GETRSX to load. Operators of disc systems simply have to ensure that there is a disc installed before runnung POKERSX and that there is a copy of RELOCODE.BIN on the same disc as any program which uses it.

One final caution - although the program is completely relocatable, the operating system insists thai any RSX's must lie within the central 32k of RAM , ie. between &4000 and &C000. This means in practice that if you have a program which sets HIMEM lower than around 17000 (an unlikely occurrence). then you cannot use GETRSX to install the extension program.


★ PUBLISHER: The Amstrad User (Australia)
★ YEAR: 1986
★ AUTHOR: John Wells


Je participe au site:
» Newfile(s) upload/Envoye de fichier(s)
★ AMSTRAD CPC ★ A voir aussi sur CPCrulez , les sujets suivants pourront vous intéresser...

» Applications » RSX SOM (Amstrad Magazine)
» Applications » RSX Split : Amstrad en Modo 1 con 7 Colores en Pantalla
» Applications » Multi - Mode (Amstrad Computer User)
» Applications » Rsx - 3D - Processors
» Applications » Recover
» Applications » Rsx - Hardcopy - Dmp 2000

CPCrulez[Content Management System] v8.7-desktop/cache
Page créée en 114 millisecondes et consultée 842 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.