SUMMARY
Executing the COLOR statement with a zero (0) as the foreground color
gives "Illegal Function Call" on the EGA SCREEN modes 7, 8, and 9. For
example:
10 SCREEN 9
20 COLOR 0,0 ' Gives "Illegal function call"
This is because zero (0) is not within the allowed range of attributes
with the EGA. The range of attributes is 1 to 3 for an EGA with 64K,
and 1 to 15 for an EGA with more than 64K of memory.
You can work around this behavior by using the PALETTE statement to
reassign the color of zero to another attribute number. This can be
accomplished by doing the following:
DIM Pal%(16)
SCREEN 7
Pal%(0) = 15
Pal%(15) = 0
PALETTE USING Pal%(0)
COLOR 15,1
CLS
This information applies to QuickBasic versions 2.00, 2.01, 3.00,
4.00, 4.00b, and 4.50; to Microsoft Basic Compiler versions 6.00 and
6.00b for MS-DOS, and to Microsoft Basic Professional Development
System (PDS) versions 7.00 and 7.10 for MS-DOS.