SamCoVT / TaliForth2

A Subroutine Threaded Code (STC) ANSI-like Forth for the 65c02
Other
29 stars 5 forks source link

split native words #70

Closed patricksurry closed 4 months ago

patricksurry commented 4 months ago

Here's a first pass at #68. Most of the volume is still the core words but perhaps makes it easier to browse and navigate. The native.asm file manages most of the conditional inclusion so that's not scattered as much throughout. Both make and make taliforth-minimal.bin still work ok.

Not sure if I like the native_*.asm naming. An alternate would be to rename native.asm to words.asm and then have words/ folder containing the various pieces. Let me know what you think.

Here are the current line counts:

     254 native.asm
    1068 native_assembler.asm
     544 native_block.asm
    7655 native_core.asm
     560 native_disasm.asm
     298 native_double.asm
    1761 native_ed.asm
     265 native_editor.asm
     691 native_string.asm
    1169 native_tali.asm
     432 native_tools.asm
     530 native_wordlist.asm
   15227 total
SamCoVT commented 4 months ago

I think that looks pretty reasonable. Do you like native_xxxx.asm or words_xxxx.asm better? Tali used to have several words that were in Forth rather than assembly, which is where the difference between "native" and forth-defined words came from. All of the words were eventually assemblerized, so I don't know if that distinction is important anymore. They are still "native" in that Tali comes with them.

patricksurry commented 4 months ago

i don't have a strong preference but currently I'd lean towards just having a "words" folder with files named like core.asm, string.asm, block.asm etc inside it. this mirrors the tests/ structure and declutters the top level. wdyt?

On Wed, Apr 24, 2024 at 9:14 AM SamCoVT @.***> wrote:

I think that looks pretty reasonable. Do you like native_xxxx.asm or words_xxxx.asm better? Tali used to have several words that were in Forth rather than assembly, which is where the difference between "native" and forth-defined words came from. All of the words were eventually assemblerized, so I don't know if that distinction is important anymore. They are still "native" in that Tali comes with them.

— Reply to this email directly, view it on GitHub https://github.com/SamCoVT/TaliForth2/pull/70#issuecomment-2074921527, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABA5MKTOTCWSUTGVU3R4XWTY66V3HAVCNFSM6AAAAABGRX4JQOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZUHEZDCNJSG4 . You are receiving this because you authored the thread.Message ID: @.***>

SamCoVT commented 4 months ago

I like the idea of the "words" folder with the simple names based on wordlist.

I was thinking of updating the python script that generates docs/WORDLIST.md to also show the location of the word, but it already lists which wordset it comes from (taken from the specially formatted comments above words). There are a few oddballs, like words taken from gforth that aren't actually in the forth standard, but we can just update the comments for those few words and I think I would be happy with that. We can leave that as a future issue (if it even is an issue - the existing comments might be good enough) and not worry about it for this PR.