Updated 2001 July 8
- Changing colorForth
- Color hexagons
- North bridge
Comfortable to use for it minimizes finger motion. Here is one of the keypads displayed at lower right of the screen. The keys corresponding to these characters are:
Each key executes a word. In this case, the top 24 add their value to the word being typed. The thumb keys have functions:
- x - cancels the word
- . - ends the word
- * - multiply character, displays keypad with more characters
You cannot backspace characters (they've already been packed). Only cancel a word/number and start over. As the word is typed, its packed form is on the stack, displayed at lower left. This is unintentional, the consequence of using the stack while it's being displayed.
- x - cancels or deletes
- . - leaves the current keypad
That was the second keypad. The home keypad has thumb keys:
The number keypad builds a number as the others build words. The number grows on the stack, displayed at lower left. Its thumb keys provide:
- 9 - displays number keypad
- * - displays keypad with more characters
The number base controls display of the stack. It sticks until changed.
- - - number to be negative
- f - switch to hex base
- 9 - switch to decimal base
Applications may have their own keypads.
The word 'save ' copies colorForth to floppy, starting at sector 0. This floppy is bootable. But not readable by DOS, since it has no FAT tables or directory.
Change it as you like. I'll be changing blocks 0-62. So to allow updates, you might put your code in blocks 64-161.
COLOR.COM only initializes blocks 0-62. Typing '63 99 erase ' will zero blocks 63-161. This readies them for Editor.
The word 'e ' restarts Editor at its current block. Even blocks are code, odd are documentation. The keypad has all function keys:
These keys select the color of words to be inserted after the cursor. They display an entry keypad from which . returns. For the meaning of these colors.
- . - leave Editor. You might first need to leave the insertion keypad with a different .
- + - scroll block by 2
- - - scroll block by -2
- * - swap between code and documentation
- l - move cursor left 1 word
- u - move cursor up (actually left 8 words)
- d - move cursor down (actually right 8 words)
- r - move cursor right 1 word
- x - delete the word before the cursor
- i - insert a word previously deleted
The phrase '60 edit ' starts Editor at block 60.
- w - white words (execute)
- r - red words (define)
- g - green words (compile)
- m - magenta words (variable)
- c - cyan words (compile macros)
- t - white (text, comment) words
- C - text words with first character capitalized
- S - text words, all caps
Outside Editor, the phrase '64 copy ' will copy the current block to block 64. And set 64 as the current block.
Editor has a learning curve. Don't be in a hurry. I find it pleasant to use and refreshingly different from ordinary editors.
The cursor is not changed as you scroll blocks. This is so you can return and find it where you left it. But sometimes it's below the displayed block and invisible. If you don't move it up, you will insert at the bottom, as expected.
- Put a number on the stack
- Toggle between decimal (9) and hex (f)
- Put another number on the stack
- Type + * or /, result on stack
- Define other operators in your block
The phrase '0 dump ' displays 16 words starting at location 0. Thereafter, the words u and d scroll up and down. Words are displayed in hex, with address at right. Change words with 'n a ! '.
The word 'file ' loads a utility that reads/writes a DOS file. An empty floppy must be initialized by DOS, Windows, Unix:
This builds the FAT tables and directory. These files will be contiguous. Their names must be 8 characters or less, all caps, to keep the directory simple. FILLER fills-out cylinder 0.
- Write a 2KB file FILLER
- Then the file you want to read. Or one longer than you intend to write.
Then the phrase '2000 block get ' will get the size of the file from the directory and read enough cylinders, starting with cylinder 1, into block 2000.
The phrase '0 63 blocks put ' will write the file size (63 blocks) to the directory then write 4 cylinders, starting with cylinder 1, from location 0. This is how I write COLOR.COM.
The basic words 'reads ' and 'writes ' have parameters address, starting cylinder, number of cylinders. You can examine or write any floppy. There's no facility to format a floppy.
One way to update colorForth is to run the new COLOR.COM. Mount a copy of your bootable floppy and type '0 0 3 writes '. This updates blocks 0-53.
Type 'hex '.
Displays 7 hexagons. Center one has color at top of screen (rgb: 888).
One to left has less red, to right more red. To upper left less green, to lower right more. To lower left less blue, to upper right more.
- Upper r g b increase rgb of center hex
- Center r g b decrease
- + and - change amount of increase/decrease
- . escape
Type 'north ok '
Displays device id and class for all devices.
Displays 1st 16 registers for selected device.
This is the PCI bus controller. Each device has an address and registers that configure it. Switch between these by choosing devs/regs with the Editor in ok. Devices on my computer are named.