projects
/
rrq
/
jonasforth.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a378304
)
Add notes on how literals are handled
author
Jonas Hvid
<mail@johv.dk>
Thu, 14 Nov 2019 17:28:11 +0000
(18:28 +0100)
committer
Jonas Hvid
<mail@johv.dk>
Thu, 14 Nov 2019 17:28:11 +0000
(18:28 +0100)
notes
patch
|
blob
|
history
diff --git
a/notes
b/notes
index 378a31df307a3fed1eb55c2642411263770c8815..69065509654742c56bc3c3f2a54ea5d7391169cd 100644
(file)
--- 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.
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.