Frequently Asked Questions

Although we do our best to prepare accurate and readable documentation, sometimes readers miss important things and other times the documentation is unclear or misleading. The questions here reflect items that are either easily missed or need to be clarified in the documentation; as the latter sort are corrected by revisions they are removed from the FAQ.

Q. I get to a place from time to time where I'm doing a number entry and "num" shows up on the right but no number shows up on the left. The number enters correctly. A "warm" does not clear it but if I enter a nonsense word it starts working correctly.

A. That sounds like the data stack has underflowed. The arrayForth interpreter doesn't check for stack underflow. When you type a nonsense word you trigger "abort" which does check for underflow and resets the stack pointer. Also, the word "c" clears the stack. Actually it resets the stack pointer, so if the stack has underflowed or if you just want to empty the stack you can reset it without aborting by typing "c".

Q. I edit a block, and as I leave, there are some words that I've deleted and don't want any more (using x). Now, I can paste them back in any block with `i'. Which is ok. BUT, I have two keys that maps to i (on either side of the spacebar). So, if I'm editing a buffer, and want to alt-tab to a different window, I paste a word from the clipboard as I switch windows. Bah! If I don't spot this right away, and leave it there... and later do a 'save'. Well, it could lead to really hard to track down bugs.... Of course the 'audit check all' will help here... but still.

A. colorForth does not use the windows clipboard. When you cut (or copy) words from a block they live in a memory buffer ("trash") that belongs to the instance of colorForth you are running, are available only within that instance, and are discarded only when colorForth exits *or* when you do a warm start with warm . Chuck did not provide a way to empty the trash buffer and we have not added such as yet either.

Q. When using Linux can my serial ports be the same every time I plug in my eval board?

A. This has worked for us, using Ubuntu 12.04.

Attach a USB cable to your eval board and plug it into your Linux machine. Now type ls /dev/serial/by-id . What I saw was a link whose very long name included the serial number of my board. This is a link to /dev/ttyUSB0 or whatever tty device was assigned to this port of your board. Make a link to this device in ~/.wine/dosdevices and it will work everytime you plug in this port of this board on this computer. You no longer need to set the serial port parameters in linuxwine.bat or ArrayForth handles the serial ports on it's own now. Here is what worked on one eval board, your serial number will be different:

ln -s /dev/serial/by-id/usb-GreenArrays_EVB001_Port_A_GAEVB001S0003A-if00-port0 com1

ln -s /dev/serial/by-id/usb-GreenArrays_EVB001_Port_A_GAEVB001S0003B-if00-port0 com2

ln -s /dev/serial/by-id/usb-GreenArrays_EVB001_Port_A_GAEVB001S0003C-if00-port0 com3

If you have more than one eval board you can make more links with higher com numbers, and if you need more flexibilty because you work with many different boards or with non FTDI serial interfaces, then you can still make links directly to the device names /dev/ttyUSB0, etc.

Q. How do I change variable values from the interpreter?

From the arrayForth User's Manual section, Magenta Variable Name Entry "... Display a block containing a variable and change the variable using the interpreter."

I tried to type the new value followed by the variable name, but only get varname? as response. So the interpreter doesn't seem to know about it.

A. The interpreter only recognizes variables when they have been compiled. Load the block with the variable definition in it. Type, for example, "1 varname !" without the quotes. You should see the value 1 in green next the magenta variable in the source block. If you type save now, this value will persist. The manual will be updated to clarify this.

Q. In Linux should I run arrayForth as root or as a user?

A. Do NOT run arrayForth as root. See the Wine FAQ at "7.11. Should I run Wine as root?"

Q. Why did it stop working?

If you had something working before and now it doesn't, use this checklist to diagnose the problem.

1. Use the AUDIT utility to see what has changed in your source code. In arrayForth, type AUDIT LOAD CHECK to load the audit utility and read in the backup file, Then type AX to see an index of the first 60 blocks. Blocks that have changed will be RED while unchanged blocks will be WHITE. Type NX (for Next Index) to see the next 60 blocks, and so on until you have satisfied yourself or have reached block 1439.

2. Are you compiling your code? Look at block 200 to see if it refers to your source code.

3. Is the no-boot jumper in the correct position? If it's out then the boot from flash can conflict with use of the IDE.

4. Are you addressing the correct serial port? Check to see that a-com and c-com have the same values that your operating system says they should have. And if you change a-com, be sure to type WARM or save and restart arrayForth or the change will not take effect.

Valid XHTML 1.0 Strict