Showing posts with label Simulator. Show all posts
Showing posts with label Simulator. Show all posts

Monday, November 14, 2011

A Couple Of Cheat Sheets

I have reduced my tutorials on the Green Arrays Editor and the the Green Arrays Simulator to a couple of one pagers. I'm going to post them here for quick reference. Copy and paste to suit.

====
EDITOR


Bring up colorFORTH

“200 edit <cr>” - now editing page 200.

Move the cursor - “J” “K” “L” and “;” keys. If you get too far
lost hit the and you are out of the editor

Exit program “bye”

To continue where you left off type "e" <cr>. Back editing the screen.

Use the “N” key to delete a word at a time.

Pick a color (see chart below) and type in the word you want to add. <cr> and the word is added. You can now add another word. will erase a word if you typed it incorrectly. When you are done typing words of that color hit <spacebar> and you are back in the editor. You can now erase any wrongly entered words or if you need to change a word's color by using the cursor and “A” key.

“F1” key to toggles between decimal and hexidecimal entry modes.

"save" when you are all done and out of the editor.

Color Words:

White - “R” - comment
Yellow - “U” - interpreted words
Red - “I” - define Forth word
Green - “O” - compiled words and numbers
Blue - “X” - display macro (mostly text formatting for now)
Magenta - “,” - variable
Grey - “Z” - compiler feedback
Cyan - “.” - compiled macro call

====

SIMULATOR


Chart in Section 7.5 on Page 31 of the DB004 document.

Type “so <cr>”. Simulator and its control panel.
“F” key to single step
Change focus “M” key.
Back to beginning “A” key.

Leave simulator - <spacebar>

Step/stop - “F”
Fast/slow - “S”
Go continuously - “D”
Back to beginning - “A”

Increase step size +1 - “V”
Decrease step size -1 - “C”
Increase step size +100 - “R”
Decrease step size -100 - “E”

Swap focus (yellow and red cores in the display) - “M”
Scroll through focus core's memory, increasing - “,”
Scroll through focus core's memory, decreasing - “.”
Display alternate core's memory or active core display - “/”

Display sizing
Taller - “Q”
Wider - “W”
Shorter - “Z”
Narrower - “X”

Select focus node. Use the “M” key to move the other node.

Left move - “J”
Right move - “;”
Up move - “K”
Down move - “L”

To move the block of displayed cores around

Left move - “U”
Right move - “P”
Up move - “I”
Down move - “O”

====

Hope that helps.

Saturday, October 15, 2011

Stimulating Simulating

Now that you have learned to edit and have edited Screens 148 and 200 it is time to simulate the code - six NOPs and a jump back to the start. I have done just a "jump to start" program (the hardware guy's minimum standard. A favorite for the Z-80 set.) but then there would be nothing to see. So let us simulate.

Print out the chart in Section 7.5 on Page 31 of the DB004 document. It will help you understand what the simulator is doing.

Type in “so <cr>”. That will bring up the simulator and its control panel. Use the “F” key to single step through the program. Well OK. Node 100 is not the main focus. You can change that by using the “M” key. And change it back with the same key. You are now well into the program and you would probably like to see it from the start. That is what the “A” key is for. Now you can start “F”ing from the beginning.

That is all you need to get you started running programs in the simulator. There are some other commands that will interest you if you want to go deeper. You can try them out on this simple program without getting into much trouble. When you are done the spacebar will get you out of the simulator.

Leave simulator - <spacebar>

Step/stop - “F”
Fast/slow - “S”
Go continuously - “D”
Back to beginning - “A”

Increase step size +1 - “V”
Decrease step size -1 - “C”
Increase step size +100 - “R”
Decrease step size -100 - “E”

Swap focus (yellow and red cores in the display) - “M”
Scroll through focus core's memory, increasing - “,”
Scroll through focus core's memory, decreasing - “.”
Display alternate core's memory or active core display - “/”

Display sizing
Taller - “Q”
Wider - “W”
Shorter - “Z”
Narrower - “X”

Select focus node. Use the “M” key to move the other node.

Left move - “J”
Right move - “;”
Up move - “K”
Down move - “L”

To move the block of displayed cores around

Left move - “U”
Right move - “P”
Up move - “I”
Down move - “O”