On 3/29/12, Programmingkid programmingkidx@gmail.com wrote:
On 2012-Mar-22 00:09 , Programmingkid wrote:
Is there a way to add words to the end of a definition? If my word is declared like this:
: myword firstWord secondWord ;
is there a way to append a word to the end of this word so it looks like this:
: myword firstWord secondWord thirdWord ;
The usual way I'd do something like that if I had to patch a live system would be as follows:
ok : anotherWord secondWord thirdWord ; ok patch anotherWord secondWord myword ok
The patch word is an empty definition in OpenBIOS. What is it suppose to do?
patch new-word old-word word-topatch ( -- ) Replace old-word with new-word in word-to-patch.
Described in http://docs.oracle.com/cd/E19641-01/802-3241/802-3241.pdf
There are also a couple of examples in Mitch Bradley's Forth and Open Firmware Lessons:
http://wiki.laptop.org/go/Forth_Lessons