★ APPLICATIONS ★ DIVERS ★ Easier inversions ★![]() |
| Invert RSX (Computing with the Amstrad) | Applications Divers |
IN a menu-driven program it is useful to be able to highlight a selection by inverting the text and paper colours. It is possible to do this in Basic either by printing CHR$(24) or by exchanging pen and paper inks using Basic's INK command, and reprinting the text. This must be repeated to return the block to normal and becomes very unwieldy. This short program sets up an RSX to invert characters on the screen without reprinting. The command works in any mode and can be used in two ways. Firstly: |INVERT,column, row, lengthwill invert length character cells (up to 256) starting at location column,row. Parameter values off the screen can cause unexpected results but will not generate an error.The second form of the RSX is : |INVERT,col,row,len,pen,penIf the last two parameters are omitted the default values are 1 and 0. If other values are used the pens are XORed with those on the screen and can give interesting colour effects. Repeat the command to restore the text to normal.The machine code loads to &A500 but can easily be relocated to any &100 boundary. To do this change the two A5s in line 140 and the two in line 150 to the high-byte of the new address. You will also need to modify MEMORY, CALL and adr appropriately. Also you have to either modify the checksums or omit line 120. -
|