X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=notes;h=69065509654742c56bc3c3f2a54ea5d7391169cd;hb=1da54a4e8c55400181194a2db2cce4b96e479d61;hp=378a31df307a3fed1eb55c2642411263770c8815;hpb=a37830428f0b711f4ed8da94b9b7361fc35c2fcd;p=rrq%2Fjonasforth.git diff --git a/notes b/notes index 378a31d..6906550 100644 --- a/notes +++ b/notes @@ -90,3 +90,10 @@ Here, DOCOL (the codeword) is address of the simple interpreter described above, while EXIT a word (implemented in assembly) that takes care of popping ESI and continuing execution. Note that DOCOL, DUP, + and EXIT are all stored as addresses which point to codewords. + +## Literals + +Literals are handled in a special way. There is a word in Forth, called LIT, +implemented in assembly. When executed, this word looks at the next Forth +instruction (i.e. the value of ESI), and places that on the stack as a literal, +and then manipulates ESI to skip over the literal value.