Personal Computer News


Changing Colours For A Better Display

 
Published in Personal Computer News #106

Changing Colours For A Better Display

This patch for the BBC's Operating System allows the foreground colour of Mode 7 to be changed. Some televisions display blue or green text better. Normally this is achieved by using Mode 6 and the VDU19 command.

This routine makes all text output to the screen appear blue by intercepting the output routine and printing a CHR$134 if the last colour printed was a carriage return (CHR$13).

The value of &E0A4 in lines 190 and 120 is fine for OS 1.2. For other Operating Systems, this address can be found by PRINT~!&20E AND &FFFF

The code in line 205 is for cyan text which can be altered to 129 for red.

Line 240 puts the code in a backwater of the memory. Other possible sites are &900 for disk users, or &D00 for cassette users.

10 FOR X=0 TO 2 STEP 2
20 P%=&B00
30 [OPT X
40 .START
50 CMP #13
60 BNE NTEOL
70 JSR &E0A4
80 LDA#130
90 .NTEOL
100 JSR &E0A4
110 RTS
120 ]
130 NEXT
140 ?&20E=0:?&20F=&B

Jeff Tullin, Gateshead, Tyne & Wear

Jeff Tullin