In repairing an instrument cluster, I need to replace a controller which is built on an Motorola MC68HC11 using Forth. While I was able to dump the whole memory, it is unknown which Forth is used and the available words seem very limited.
How does one proceed in order to locate and change a known value in memory in an embedded Forth environment?
Depending on the flavour of Forth you can list all "words" using
vlistorwords. Words include any variables or constants defined, and variables can be manipulated with the following operators:!( n addr — ) Stores a single-length number into the address.@( addr — n ) Fetches that value at addr.?( addr — ) Prints the contents of the address, followed by one space.+!( n addr — ) Adds a single-length number to the contents of the address.For double length variables there are:
2!( d addr — ) or ( n1 n2 addr — ) Stores a double-length number (or a pair of single-length numbers) at address addr.2@( addr — d ) or ( addr – n1 n2 ) Fetches a double-length number (or a pair of single-length numbers) from addr.