From b618fbabca4660203ea4801ddc1b4fb38ca5347e Mon Sep 17 00:00:00 2001 From: kitty Date: Tue, 27 Jan 2026 18:42:13 +1100 Subject: untested @ ! and some notes --- readme.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'readme.md') diff --git a/readme.md b/readme.md index abeafe8..e01353b 100644 --- a/readme.md +++ b/readme.md @@ -44,7 +44,26 @@ so a wonky but hopefully not too slow solution is to compile - `mov r11, [cfa]` = `94 BB [CFA]` - `call r11` = `41 FF D3` -## Some Links +### words to bootstrap from +i want to make the kernel reasonably small, +especially if i add an assembler. +but obviously we need *something* to bootstrap from. +(this list is Inspired by [miniforth](https://github.com/meithecatte/miniforth)'s builtins) + +- `!` (`val addr -- `): store a 64 bit word +- `@` (`addr -- val`): fetch a 64 bit word +- `c!` (`byte addr -- `): store a byte +- `c@` (`addr -- byte`): fetch a byte +- `:` (` -- `): compile a word from the current input source +- `;` (` -- `): stop compiling the current word +- `parse` (` -- c-addr u`): parse a word from the *forth init* (see footnote) +- `latest`: a variable, the latest defined word +- `state`: a variable, determines current mode (interp./compiling) + +on `parse`: i don't want to deal with file access and stuff from the kernel. +so this word will be Upgraded in the forth init to read from a file. + +### Some Links - starting forth part 1: http://www.bradrodriguez.com/papers/moving1.htm - a forum thread about determining empty stack with TOS register: http://forum.6502.org/viewtopic.php?t=8424 -- cgit v1.2.3