PDA

View Full Version : EEC! in Forth


MLCarter
06-07-01, 09:43 PM
Hello I am attempting to save values from RAM into EEPROM with the following instruction ;

: WREE 9 0 DO I 2 * 4224 + @ 256 /MOD
I 2 * 46650 + EEC! I 2 * 46651 + EEC! LOOP ;

For some reason this results inthe machine spitting unknown characters out the serial port and LCD, can anyone see the problem ?

rob
06-09-01, 03:10 AM
Your code works when I tested it on Max-FORTH V3.5E. Perhaps the problem occurs with another word or an interaction with another word. You are saving 18 bytes from location 0x1080 into EEPROM starting at 0xB63A. Could that conflict with where your I/O space is? Is your base DECIMAL at that point or is it HEX? Try that piece of code on a COLD system using DECIMAL as the base and see if that works or fails. If it fails, then your hardware is different than mine. If it works then you move towards the code that fails until you find what causes it to fail.

Rob