Druzyek wrote:
Would it be possible to comment out some of the words I don't need and recompile to make the binary smaller? Would I need to edit the word lists too to get that to work? The closest I can get to a rommable version might be a cut down version of the runtime and having my emulator supply bytes from a file every time TaliForth requests a key press. Maybe it would make sense to keep the full version to develop interactively and have a reduced version to switch to that just reads from a file and executes.
The default image is a complete 32K ROM meant for simulating in py65mon. There is some unused space in that ROM (see the "filler" value when you assemble it), but it generates from $8000 all the way through the reset/IRQ vectors ending at $ffff. I believe the steckschwein folks modified their platform file to not generate the vectors at the end of the memory space, and their image is only about 22K. That allows them to load it into RAM to run it, using loading facilities in their existing kernel.
To make things smaller, you should be able to remove the assembler, disassembler, and "ed" editor (not to be confused with the "editor" for working with blocks). I'll have to try doing that to see what the instructions are. Those three things live in separate asm files (bought in from the taliforth.asm file), but you will need to remove the headers for all of those words in headers.asm (this is a singly linked list where each "nt" (name token) links to the next word in the list). There are actually four wordlists - a root wordlist, the main forth wordlist, an editor wordlist (for the block editor), and an assembler wordlist.
To remove the assembler, for example, you would comment out the .require "assembler.asm" in taliforth.asm, then go into headers.asm and search for ASSEMBLER-WORDLIST. You should leave the "assembler_dictionary_start:" so it resolves somewhere else in the code, but you don't care what it resolves to as it won't be used anymore. You can then comment out from nt_asm_adc_h: through the end of the file.
You should also remove the forth word that invokes this wordlist (only needed because you've eliminated an entire wordlist. Search for "nt_assembler_wordlist:". You'll actually be editing nt_root_wordlist so it doesn't link to nt_assembler_wordlist anymore. In the "nt_root_wordlist:" header, change the very first item after .word from "nt_assembler_wordlist" to "nt_editor_wordlist".
You should now be able to reassemble without the assembler being installed.
If you want to remove further words, you can pick and choose from the words in native_words.asm and then "unlink" their header entry by making the previous entry skip over them. Then you can comment out their header as well.
I'll give this a try and make sure it works as I explained it, but feel free to give a holler if you get stuck or break something.
Druzyek wrote:
In case it's useful, make is 3.81. I tried running make -B and it shows the line "python3 tools/generate_wordlist.py > docs/WORDLIST.md" with error 9009. Typing python gets me a python prompt but python3 opens a browser window to install Python from the Windows store but doesn't print anything to the console.
I had this odd behavior as well. Apparently the python3 thing is kinda linux-only, but windows captures trying to run python or python3 and redirects you to the MS store. Installing the latest python 3 on Windows only installs python.exe but not python3.exe, so that remains redirected. Python is still a bit of a mess with their v2 vs v3, and it's been like that for years now.
I've updated the Makefile and issued a pull request to the Tali2 project, but it might be a bit before scotws can take a look at it. You can snag just the Makefile from
https://github.com/SamCoVT/TaliForth2/t ... m/Makefile if you'd like to use make.