Commit Graph

188 Commits

Author SHA1 Message Date
cdo 6474c2f227 Logically flip SPACE? to NSPACE
WORD was using it like this, and it's easier to fix it this way rather
than insert an INVERT into WORD.
2026-02-27 19:52:44 +00:00
cdo 42a9c5db08 Fix 0BRANCH function table entry 2026-02-27 19:50:50 +00:00
cdo 83022925f7 Fix bugs from round 1 of debugging
There were several issues I ran into immediately:

- The cold start was pointing to the dictionary entry of QUIT instead
  of the CFA
- The RSP needed to be set before calling QUIT, as DOCOL uses the
  return stack
- I'd forgotten LITs before values in a couple of places
- I'd not accounted for LITs in several branch offsets
- A few dictionary links were wrong
2026-02-27 18:35:17 +00:00
cdo 74ff0b037c Set values of HERE and LATEST 2026-02-27 16:20:36 +00:00
cdo ca6ac0f9bf Implement cold start 2026-02-27 16:20:36 +00:00
cdo 2fafd02e28 Compile QUIT 2026-02-27 16:20:36 +00:00
cdo bf65c7470a Compile INTERPRET 2026-02-27 16:20:36 +00:00
cdo 62f3bff926 Compile IMMEDIATE? 2026-02-27 16:20:36 +00:00
cdo 797a95204f Compile , 2026-02-27 16:20:36 +00:00
cdo c4303cc2ca Compile NUMBER? 2026-02-27 16:20:36 +00:00
cdo 78d45c61de Compile NEGATE 2026-02-27 16:20:36 +00:00
cdo dda02a1d9f Compile DIGIT 2026-02-27 16:20:36 +00:00
cdo c2b0c55893 Compile >CFA 2026-02-27 16:20:36 +00:00
cdo a8c51d0703 Compile FIND 2026-02-27 16:20:36 +00:00
cdo a4e7673b7a Compile NAME-LEN 2026-02-27 16:20:36 +00:00
cdo 938bd98ef6 Untabify WAT source 2026-02-27 16:20:36 +00:00
cdo 777531abc4 Compile STRING= 2026-02-27 16:20:36 +00:00
cdo a7c96fc56c Compile WORD 2026-02-27 16:20:36 +00:00
cdo 05a3e72669 Compile SPACE? 2026-02-27 16:20:36 +00:00
cdo 55bc5060e4 Compile TUCK 2026-02-27 16:20:36 +00:00
cdo 93f0b312a8 Re-wrap top comment 2026-02-26 18:30:49 +00:00
cdo ef8e9ad3fd Add source code comments for colon words 2026-02-26 18:20:42 +00:00
cdo dde7d0d710 Fill in addresses of constants and variables (and add a few more) 2026-02-26 18:10:56 +00:00
cdo 5dcc5de722 Reword comment about $trampoline a little 2026-02-26 18:10:43 +00:00
cdo 59ee6149e5 Switch to -1 for true, 0 for false
This means you can use the bitwise operators for booleans too.
2026-02-26 18:09:36 +00:00
cdo 3b3807e802 Fix 0BRANCH implementation 2026-02-26 18:09:04 +00:00
cdo c2a8b304b1 Fix INVERT's link 2026-02-26 18:08:50 +00:00
cdo 163811bbc6 Fix emulator's submit_line() 2026-02-26 18:08:22 +00:00
cdo 9d671ad8ef Fix 2DUP implementation 2026-02-26 18:07:49 +00:00
cdo db13287c91 Implement BRANCH and 0BRANCH 2026-02-25 21:37:27 +00:00
cdo a830998617 Replace local set then get with tee 2026-02-25 21:29:14 +00:00
cdo eab32c9b42 Add message to index.html for if JS is disabled 2026-02-25 14:13:58 +00:00
cdo 6ff9791b11 Tweak README 2026-02-25 13:46:23 +00:00
cdo 6e12c9c72e Implement a nice terminal emulator on the JS side 2026-02-25 13:46:14 +00:00
cdo cc7609b847 Implement a bunch of core forth stuff
Not quite ready yet, but getting there.
2026-02-25 13:45:52 +00:00
cdo d11805cd6c Rejig serial periph 2026-02-24 15:53:43 +00:00
cdo 0608e2c476 Add 'System halt' log message when WASM exits 2026-02-24 15:53:17 +00:00
cdo d3e2407f3b Create initial emulator and hello world demo 2026-02-24 15:52:48 +00:00