EMMA 02

BASIC

  • Home
  • Download
  • Change Log
  • Help
  • Compilation
    • Windows
    • OS X
    • Ubuntu
    • Fedora
    • openSUSE
  • Forums
  • Tape Conversion
  • Machine Code
    • SYSTEM00
    • CDP1801
    • CDP1802
    • CDP1804
    • CDP1805
    • Differences
  • Pseudo Code
    • AMVBAS
    • AM4KBAS
    • CARDTRAN
    • Chip-8, 8X, ETI-660 & Elf
    • FEL-1
    • FPA-1
    • FPL-2
    • FPL-4
    • GPL-2
    • GPL-3
    • GPL-4
    • GPL-A (2K RAM)
    • GPL-A (2K ROM)
    • ST2
    • ST4
    • STK
    • Test-Word
    • Super-chip
  • XML Code
    • Main Elements
    • I/O
    • System
    • A/D Convertor
    • BASIC
    • Batch wav
    • Bootstrap
    • Cassette
    • CD4536B
    • CDP1851
    • CDP1852
    • CDP1854
    • CDP1855
    • CDP1877
    • CDP1878
    • CDP1879
    • Debugger
    • COMX Diagnostic
    • Dip switch
    • Disk
    • EF Buttons
    • Flip Flop
    • Front Panel
    • GUI
    • HEX Modem
    • I/O Group
    • Keyboard
    • Keyfile
    • Locations
    • Memory
    • MM57109
    • Printer
    • RTC
    • Sound
    • Splash
    • USB
    • Video
    • Videodump
    • vt
    • X Modem
  • BASIC
    • General Information
    • COMX BASIC V1.00
    • Floating Point BASIC 2.2
    • Pecom 32 BASIC
    • Pecom 64 BASIC 1.0 & 4.0
    • Quest Super BASIC 1.4
    • Quest Super BASIC 3.0
    • Quest Super BASIC 5.0
    • Quest Super BASIC 6.0
    • RCA BASIC3 V1.1
    • Telmac SBASIC v24.3
    • Error Messages
  • Computer List

 

 

 

 

 

 

 

 

 

 

 

 

COLOR

Format: COLOR (Y, Z, X)

Supported by: Pecom 32 BASIC, Pecom 64 BASIC 1.0 and 4.0

Similar commands:
COMX BASIC V1.00: COLOR
Floating Point BASIC 2.2: COLOR
Telmac SBASIC v 24.3: COLOR

The Pecom 64 BASIC 1.0 and 4.0 characters are in 2 different colour sets, selectable by the highest bit (PCB) of the character number itself. So characters 0 to 127 are the same as characters 128 to 255 in different colours.

The COLOR command is in the format, COLOR (Y, Z, X), where X is a numeric expression which determines the color combination to be used for the 2 characters sets. The colour combinations for different values of X are given in table 1 below. Y and Z specify the character range to be changed.

Now, try the command

COLOR (65, 66, 9)

followed by pressing CR, and note that characters A and B have turned blue. Try some other commands with the "9" replaced by any number from 0 to 11 inclusive. Observe the colour changes and compare them with table 1 below. Note that COLOR (0) corresponds to the default character colours.

X

CHARACTER < 128

CHARACTER >= 128

0

BLACK

 

GREEN

 

1

RED

 

YELLOW

 

2

BLUE

 

CYAN

 

3

MAGENTA

 

WHITE

 

4

BLACK

 

BLUE

 

5

RED

 

MAGENTA

 

6

GREEN

 

CYAN

 

7

YELLOW

 

WHITE

 

8

BLACK

 

RED

 

9

BLUE

 

MAGENTA

 

10

GREEN

 

YELLOW

 

11

CYAN

 

WHITE

 

Table 1: Colour Schemes for COLOR (Y, Z, X)

NOTE: For this to work only values X: 0 to 3, 4 to 7 or 8 to 11 should be mixed. This as these ranges actually use different values of COLB0/COLB1 and as such change the colour set used for all characters. For example COLOR (65, 65, 9) will change character A to blue but after COLOR (66, 66, 6) B will indeed be green but also A will change to red (X = 5).

The COLOR command is performing the following logic: The X value is actually mapped to CCB0/CCB1 (by writing character RAM, i.e. 'shaping' all specified characters) and COLB1/COLB0 (OUT 3, bit 5/6) of the CDP1870. See also the Video Interface System page and table 2 below.

C0LB1

COLBO

RED

BLUE

GREEN

X

0

0

CCBO

CCB1

PCB

0 to 3

0

1

CCBO

PCB

CCB1

4 to 7

1

0

PCB

CCBO

CCB1

8 to 11

1

1

PCB

CCBO

CCB1

 

Table 2: COLB1/COLB0 to X mapping