DSCF

.co.uK

Colors in PC32

PC32 being a variant of ColorForth uses color to display extra encoded information, this serves the purpose of further reducing the amount of syntax on any given program.
These colors or tags can be split into two Contexts each with its own function:
There are a total of 16 colors available for use, separated into two Contexts of 8 colors:

Compile Context:

Define

Defines a point in code where a word begins

Call

Compiles a call to word address

Number

Complies a number

Reference

Compiles a number pointing to the starting code address of the word

Source Data

Compiles a number pointing to the source code address of the word, used for strings and permanent variables

Assembler

Compiles a number directly, used for machine code compilation in sizes of 1, 2, 4 bytes depending on the size of the number

Editor

Used to control the behavior of the editor, the word marked as blue will be searched in the dictionary if found it will be executed while rendering the screen otherwise it'll be ignored

User1

Treated as a comment, can used in custom parsers by the user

Immediate Context:

Jump

Compiles a jump to the word, used as tail recursion or as a looping mechanism

Imm Call

Executes word while compiling

Imm Number

Puts number on Top of Stack(TOS) while compiling. Marked with an accent to differentiate from compile

Imm Reference

Puts address of word on TOS while compiling

Imm Source Data

Puts address of source on TOS while compiling. Marked with an accent to differentiate from compile

Macro

Inlines the word until a ; is found, used to speed up execution by avoiding flushing the pipeline in a call

Comment

Comments are ignored and automatically skipped

User2/Background

A comment that displays as background color making it invisible, can be used for formatting and in custom parsers by the users