FAQ

What are the main differences between MyNOR and My4TH?

My4TH is smaller (smaller size, less components), faster (up to 14 MHz), and has more memory (32 KB RAM and 256 KB EEPROM) than MyNOR. Additionally, My4TH is designed specifically for FORTH programming.

Is MyNOR's FORTH implementation applicable for "real world" applications?

No, MyNOR's FORTH implementation has several known bugs and is considered a proof of concept. My4TH aims to provide a more stable and complete FORTH implementation.

Can My4TH be used with MyNOR hardware?

Yes, there is a special version of My4TH Forth available for the MyNOR hardware, but with some limitations due to MyNOR's 8 KB SRAM. My4TH Forth for MyNOR has also no support for the MyNOR extension boards.

What is the difference in file exchange between MyNOR and My4TH?

My4TH uses a command-line tool for uploading and downloading individual screens or complete FORTH source code instead of copying text files into the terminal window as in MyNOR.

Can I delete Forth words from memory?

Unfortunately, the Forth architecture does not allow certain words to be deleted from memory. However, you can use FORGET and MARKER words to delete all words compiled after a certain point.

How can I fix bugs and update the My4TH-ROM?

Since the project is open source, you can fix the errors in the source code. Then you have to create a new EPROM image file with the myca cross compiler. However, it is not advisable to fix the error yourself. Instead, please report it to me so that I can fix it in an updated firmware version.

How can I reset My4TH from the software itself?

You can create a simple word to execute a hardware reset routine. To do this, compile the following code in My4TH:

hex : reset 2D00 execute ;

When you enter the command RESET, My4TH will execute the instruction at address 0x2D00, which is a jump to the hardware reset routine.

How can I save variables in the EEPROM using My4TH?

You can use the words BLOCK, UPDATE, and SAVE-BUFFERS in My4TH Forth. Use BLOCK to load a block from EEPROM into RAM, which returns a pointer to the block. You can then copy your variables in and out of the block (treat the buffer as a large binary data structure). Use UPDATE to mark the block as modified after changing a variable, and SAVE-BUFFERS to write the modified block back to EEPROM.

Why do I lose 1024 bytes of memory when using the BLOCK and BUFFER commands?

The memory loss is due to the block buffer being allocated by the BUFFER command. Once allocated, it is not released. You can work around this issue by setting a marker before using the commands and then releasing the memory after you're done.

How can I clear all previously defined words and reset memory like the "new" command in MyNOR's proof-of-concept implementation?

You can create a custom NEW word based on the example from the original MyNOR-Forth editor:

: execnew s" forget new  : new execnew ;" evaluate ;
: new execnew ;

Enter these two lines after restarting the computer, and then you can use the "NEW" command as desired.

Why does my program crash after a certain amount of time?

The problem may be due to the fact that the data stack becomes full. My4TH Forth does not check for stack overflows. If the data stack overflows, the return stack is overwritten and the program crashes.

How can I debug the data stack?

You can use the .S command to display the current contents of the data stack. This can be very helpful for debugging purposes.

Why does the KEY? word wait for a key stroke?

If you use My4TH via a serial terminal, My4TH must poll the RS-232 interface in the software. Therefore, in order not to miss any keyboard event, it is important to poll the serial port as fast as possible. For this reason it is not possible to implement a non-blocking keyboard read on My4TH. If you need non-blocking interaction with your program, you can connect additional external keys to the I/Os and read them with RINP.

How can I create a non-blocking way to interrupt a running program?

You can use the RINP command to read the RXD pin directly. Here's an example:

: test 0 begin rinp 1 and while 1 + dup . repeat cr ." break, a key was pressed" ;

Keep in mind that you may need to hold the key down for a moment to ensure the program interrupts properly.

How can I replace the editor with a new one loaded from EEPROM?

You can define a new word "EDIT" that implements the new editor. The old editor will then be "overloaded". For example, you can define the word ' : EDIT ." I am not an editor!" ; ' and call EDIT. If you enter FORGET EDIT, the effect will be gone, and EDIT will function as usual.

What does the UP word return?

The UP word returns the address of a pointer that points to the beginning of a 256-byte memory area that can be used freely by the user. To get the address of the beginning of this memory area, you must enter "UP @".

How does My4TH map the available memory of I2C EEPROMs?

My4TH Forth maps the available memory of I2C EEPROMs to the available 1K-blocks, regardless of their addresses. For example, if you install two 24LC512 EEPROMs with any I2C addresses, you will have screens 0 to 127 available. However, on the MyNOR board it is not entirely clear in which EEPROM a specific screen will be stored.

What happens on MyNOR if I add another EEPROM to an existing configuration?

Adding another EEPROM to an existing configuration on the MyNOR board may cause problems locating the previously stored screens. The new EEPROM could be assigned to screens numbers that were previously assigned to another EEPROM. It is recommended that you do not add more EEPROMs once you have a working configuration to avoid losing access to your stored screens.

Can I use other EEPROM configurations with MyNOR/My4TH, such as 1x 24LC1026 and 2x 24LC512?

Yes, other configurations are possible. However, the maximum memory expansion of 512 KB can only be achieved with eight 24LC512, or two 24LC1026 and four 24LC512, or four 24LC1026. You can also use four 24LC1025 instead of four 24LC1026, and 24LCxxx can be replaced by 24AAxxx types. Always check the data sheet to ensure the correct pin configuration and to avoid address conflicts. But the sockets on the My4th board can only be populated with 24LC512 or 24LC1026 EEPROMs.

Can I use 24LC1025 EEPROMs with MyNOR/My4TH ?

24LC1025 EEPROMs are a bit strange - the address select pin A2 must be pulled high, otherwise the EEPROM will not work properly. Unfortunately on the sockets on the My4TH and also on the MyNOR board the pin A2 is connected to GND. However, it is still possible to use 24LC1025 EEPROMs on both platforms if you connect pin 3 (A2) of the EEPROM to pin 8 (+5V). But make sure that pin 3 must not be plugged into the socket on the board (just bend the pin away from the EEPROM housing).

Can I use the EPROM simulator on the website with My4TH?

No, the EPROM emulator cannot be used with the My4TH board. My4TH uses pin 20 of the EPROM, which is unfortunately wrongly connected on the emulator board.

Can I replace the EPROM with a Flash memory for My4TH?

Unfortunately, it is not possible to replace the EPROM with a Flash memory, because Flash chips are often much slower than EPROMs. For My4TH you need an EPROM with a maximum access time of 120ns if you want to run it at 8MHz. The fastest flash chips still available today have an access time of 150ns, which means you can only run MyNOR at 1/150ns = 6.7 MHz. Also, flash memory chips have a slightly different pinout, so the socket on the My4TH board needs to be rewired. One-Time Programmable (OTP) EPROMs are available with access times down to 45ns. Furthermore EPROMs are more "retro" and therefore better suited for this project.

Note: If you can get one, you can try the W27C512-45Z. Note that this component is no longer in production, so I generally don't recommend it. The philosophy of My4TH is that it can be built with chips that are still in production. If you are using the W27C512, program the EPROM image file in the upper half of the chip (addresses 0x8000 - 0xFFFF).


If your question has not been answered yet, you might want to read about Useful things to know about Forth on My4TH.