Personal Computer News


Bright Ideas for Oric Colours

 
Published in Personal Computer News #075

Bright Ideas for Oric Colours

Q. Is it possible to change the brightness of the Oric colours via a machine code routine?

The Spectrum and many others use a command like 'bright' but this command doesn't appear in Oric Basic.

Fraser Norman, Dartford, Kent

A. You're right - there's no reserved word for changing pixel or character brightness, and the attribute system doesn't cater for this feature. There are two commands in the Oric ROM - NORMAL and INVERSE (C0F1 to C0FD) - but for some reason these have no effect as the ROM ignores them.

However, you can get a sort of inverse colour effect with characters by adding 128 to the ASCII code of the character you want, then passing that value to PLOT, as in:

V=ASC("A")+128:PLOT 2,0,V

Adding 128 simply sets bit 7 (the high or most significant bit) of the character byte, which should reverse fore- and background colours for that character cell. CHAR resets bit 7 to zero, so you can't use the trick in HIRES. PRINT also does this, which means that if you want to display long strings you're stuck with PLOT, a FOR...NEXT loop and MID$.

Fraser Norman