APPLICATIONSDIVERS ★ UPGRADE (COMPUTING WITH THE AMSTRAD) ★

Upgrade (Computing With The Amstrad)Applications Divers
★ 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 ★ 

ROLAND WADDILOVE tells you how to Step up in class with Upgrade!

ONE of the first things I did when I got my hands on a CPC664 was to have a look at its much-vaunted newer version of Basic. In fact Basic 1.1 on board the new CPC664 is very much the same as the old Basic 1.0 in the CPC464, except in the graphics deépartment, which contains many new commands.

There was a notable absence of graphics commands in Basic 1.0. This has now been rectified by the addition of several new and powerful routines.

Unfortunately this may cause compatibility problems as some software written for the new machine will not run on the old, although CPC464 programs will have less trouble running on the 664.

There's not much you can do with commercial software as it's nearly always in machine code and heavily protected. But it's possible to modify Basic programs to run on the old machine without too much difficulty. RSXs can be used to add the new commands to Basic 1.0 to (almost) bring it up to the standard of Basic 1.1.

Upgrade will enable you to run CPC664 Basic programs with very few modifications. The syntax of RSXs aren't quite the same as Basic commands and they aren't quite as flexible. However, their syntax and function have been made as similar as possible though, and you shouldn't have too much trouble translating programs.

The rules are simple. When entering or converting a CPC664 listing for your 464, precede the new commands with the vertical bar and join commands which consist of two words with a full-stop. A comma must follow the command if there are parameters. These can be expressions or actual values if numeric, or the address of a string variable.

For example:

GRAPHICS PEN 2

should be converted to:

|GRAPHICS.PEN,2

Most of the new commands take several parameters, some being optional. These are all compulsory with the RSXs. With the MOVE, PLOT and DRAW commands the old ones are still available, so these can be used if you don't need the extra parameters.

The fill command is only a simple version of the fast and powerful fill of Basic 1.1. I've taken the fill from the RSX article in the May issue of Computing with the Amstrad and modified it so that it has the same syntax and function as the CPC664 version.

Several move and fill commands may be needed to fill a complex shape which Basic 1.1 would fill with one. This is only a minor inconvenience, though.

Make sure that the mask is set to 255 so that all pixels are plotted and that the graphics write mode is 0. This doesn't matter with the 664 version, but is a consequence of the way MASK has been implemented in Basic.

Upgrade's version of COPY CHR$( #stream) isn't quite the same, due to restrictions in the way RSXs work. This command returns as a string the character at the current cursor position in the specified stream.

For example:

PRINT ASC(COPYCHR$(#3))

is quite acceptable in Basic 1.1 but is impossible with an RSX. The equivalent using Upgrade would be:

a$=CHR$(0)
|COPYCHR,3,@a$
PRINT ASC(a$)

The character read is placed in a$ which can then be used and manipulated in the same way as |COPYCHR$( #stream).

Table i contains a full summary of the commands available with Upgrade.

Upgrade will set HIMEM to &9FFF and store the machine code from &A000 onwards. To enable the new commands CALL &A000. (only call this once). SYMBOL AFTER will produce an argument error if used after this program has been run. To get round this, first save the machine code with:

SAVE"664BASIC",B,&A000,1,&2A0

HIMEM can be moved down after SYMBOL AFTER and the machine code loaded with:

LOAD "664BASIC"

Then call &A000 to enable the RSXs.

The program is far too long to give a full assembly listing so you'll have to use a disassembler to find out how it works. &A023 is the start address of the jump table and &A04A is the name table, so the address of all the commands can be found by looking at these two areas of memory.

The SCR WRITE indirection is intercepted and the mask in the C register altered according to the mask given by the user. It then jumps to the old routine in the lower ROM to write the pixels to the screen. SCR SET MODE is also intercepted so that the mask routine knows which mode it's in.

These intercepts are set up at the same time as the RSX commands are enabled. Look at &A000 to &A01E to see how it's done.

And that's all there is to it. Now who's going to be the first to send us a program that takes full advantage of Upgrade's new commands?

|FRAME Waits until the next TV frame for flicker-free graphics.

|GRAPHICS.PAPER,< ink > Sets the graphics paper ink. This is useful when printing characters at the graphics cursor using TAG.

|GRAPHICS.PEN,< ink > Sets the graphics pen ink. Again this is useful when printing characters at the graphics cursor using TAG.

|CLEAR.INPUT Clears the input buffer. This can be used to remove garbage before, for example, the keyboard is read or an INPUT statement.

|COPYCHR,< stream >,< string address > Reads the character at the current print position for the specified stream. This is the equivalent of COPYCHR$( #stream). The address of a non null string must be passed, the first character of the string is then replaced with the character read.

|CURSOR,< 0 or 1 >,< 0 or 1 > The first parameter, the system switch, enables the cursor to be displayed. The second parameter, the user switch, places it on or removes it from the screen. Basic normally disables the cursor except during inputs.

|MASK, < 0-255 >,< 0 or 1 > The bit pattern of the first parameter is used when plotting points or drawing lines. The "mask is rotated and the next point plotted if the next bit is set in the mask.

|MOVE< x>,< y >,,< plot mode >
|PLOT,< x >,< y >,< ink > ,< plot mode >
|DRAW,< x>,< y >,< ink >,< plot mode>
|MOVER,< x > ,< y >,< ink >,< plot mode >
|PLOTR,< x >,< y >,< ink >,< plot mode >
|DRAWR,,< y >,< ink >,< plot mode >

The ink and plotting mode can now be set using any of the |MOVE., |PLOT or |DRAW commands.

|FILL, The fill starts from the current graphics position and stops it when it hits either the current graphics ink or the fill ink.

CWTA

★ PUBLISHER: Computing With The Amstrad
★ YEAR: 1985
★ CONFIG: 64K + AMSDOS
★ LANGUAGE:
★ LiCENCE: LISTING
★ COLLECTION: COMPUTING WITH THE AMSTRAD 1985
★ AUTHOR: ROLAND WADDILOVE
 

★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listing:
» RSX-Upgrade    LISTINGDATE: 2013-09-15
DL: 243
TYPE: PDF
SiZE: 159Ko
NOTE: 1 page/PDFlib v1.6

★ AMSTRAD CPC ★ A voir aussi sur CPCrulez , les sujets suivants pourront vous intéresser...

Lien(s):
» Applications » Number Filer v1 (Amstrad Action)
» Applications » M.A.P. Budget Accounts
» Applications » Tax (Adrain Pegg)
» Applications » Dateiverwaltung CPC 464 (CPC Amstrad International)
» Applications » Micro Application - Calcumat / Matrix
» Applications » Tilgungsberechnung (CPC Amstrad International)
Je participe au site:
» Pour ce titre nous ne disposons de fichier executable sur CPC (Dump, Saisie du listing) , alors si vous avez ça dans vos cartons ou vous désirez usé vos petit doigts boudinés sur votre clavier faites le nous savoir.
» Vous avez des infos personnel ?
» Vous avez remarqué une erreur dans ce texte ?
» Aidez-nous à améliorer cette page : en nous contactant via le forum ou par email.

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