FiveForths

32-bit RISC-V Forth for microcontrollers

  • Devlog 29 What Kind Of Threads

    January 02, 2023 Log 29 What kind of threads Adjusting for DTC Closing thoughts Log 29 Happy New Year! In my last post, I was clearly confused about the type of jumps (direct/indirect) my Forth was making, and in fact I kinda of still have no idea what I’m talking...

  • Devlog 28 Execute

    December 30, 2022 Log 28 Fixing NEXT Execute Fixing newlines Closing thoughts Log 28 In this session I’ll start by fixing the NEXT macro and then I’ll implement the execute function. Fixing NEXT Of course I had a feeling NEXT was wrong, because it was copied blindly from derzforth and...

  • Devlog 27 Lookup

    December 30, 2022 Log 27 Lookup Execute or compile Closing thoughts Log 27 In this session I’m focused on performing hashed word lookups over the dictionary (linked list). Lookup Before performing a lookup, I forgot one important step after obtaining the token: moving TOIN. This is important because it helps...

  • Devlog 26 Checking Numbers Pt3

    December 29, 2022 Log 26 Checking numbers pt3 Interpreter pt4 Closing thoughts Log 26 Never 2 without 3? Well in this case I just found a small bug, fixed it, and i’m back to the interpreter. Checking numbers pt3 The checking of the token size (max 10 digits) and integer...

  • Devlog 25 Checking Numbers Pt2

    December 25, 2022 Log 25 Checking numbers pt2 Closing thoughts Log 25 After running some proper tests on my numbers function, I realized it’s completely flawed in more than a few ways. In this session I plan on fixing those issues. Checking numbers pt2 Previously, I planned on only storing...

  • Devlog 24 Checking Numbers

    December 25, 2022 Log 24 Checking numbers Closing thoughts Log 24 What better way to spend Christmas Afternoon than to write a cool function in RISC-V Assembly? (don’t answer that.) Checking numbers One feature of Forth is its ability to check if a string token is actually a literal number,...

  • Devlog 23 Interpreter Pt3

    December 24, 2022 Log 23 Terminal input buffer Indexes pt2 Closing thoughts Log 23 The plan today was to move the interpreter forward, but I discovered a design flaw in the terminal input buffer. Terminal input buffer In the last session, we were already processing the backspace character to “erase”...

  • Devlog 22 Indexes

    December 17, 2022 Log 22 Indexes Closing thoughts Log 22 Before I continue with the interpreter, I want to review an idea I had about indexing words. Indexes In devlog 10 I mentioned removing indexes because they’re not necessary, but I think it’s such a cool feature that I decided...

  • Devlog 21 Interpreter Pt2

    December 15, 2022 Log 21 Bug fix Interpreter pt2 Closing thoughts Log 21 Resuming from the previous log entry (same day, different session). I’ll focus on character validation this time. Bug fix I quickly discovered a bug in the ok function I defined previously. When thinking about what should happen...

  • Devlog 20 Interpreter

    December 15, 2022 Log 20 Fixme Error handling More initialization Interpreter Closing thoughts Log 20 I didn’t realize but it’s been exactly 1 month since I’ve reloaded this project and started hacking on it again. I’m quite happy with the progress so far, even though I only dedicate a couple...