~vdupras/tumbleforth

e8b7ad110e5b7114da127d58e44c547f84a3704b — Virgil Dupras 10 months ago 3ab2cfc
01-duskcc/08-immediate: fix typo and remove confusing text

Thanks Steve
1 files changed, 4 insertions(+), 6 deletions(-)

M 01-duskcc/08-immediate.md
M 01-duskcc/08-immediate.md => 01-duskcc/08-immediate.md +4 -6
@@ 65,17 65,15 @@ it’s what we could call a “parens word". Its goal is to read the parameter t
has been written next to its call and push it to `PS`. How do we access this
parameter? Through the Return Stack!

As with any call, the address where
we should return has been pushed to `RS` before we jumped to
`litn`. If the writer of the call has followed `litn`
As with any call, the address where we should return has been pushed to `RS`
before we jumped to `litn`. If the writer of the call has followed `litn`
convention[^4], it has written the number parameter right after that call.
Therefore, all we need to do is to:

1. Pop the return address from the Return Stack.
2. Dereference a 16-bit number at that address.
3. Push that number to `PS`.
4. Jump (not return) 2 bytes further to skip that number, which of course isn’t
valid i386 code.
4. Jump (not return) 2 bytes further to skip that number.

Then, all we need to do is to amend our `:` word so that it tries parsing input
as a number and, when it’s a number, write a call to `litn` by following its


@@ 212,7 210,7 @@ to your will!
[^6]: At *compile time*, remember! Yes, I know, mind bending.
[^7]: Still at compile time!
[^8]: 8 articles, 8 bits. Coincidence? I don’t think so!
[^9]: and I’f be very happy if you were! Let me know if you’re stuck at some
[^9]: and I’d be very happy if you were! Let me know if you’re stuck at some
point.

[src]: https://git.sr.ht/~vdupras/tumbleforth