yes, exactly - it can make a big performance difference in Taliforth. Have some words that 'inline' access to a few key zeropage registers would avoid a bunch of (even inline) stack manipulation in tight loops.
Conversely, a bunch of non-performance-critical Tali words are effectively inlining ...
Search found 126 matches
- Sun Feb 01, 2026 11:08 pm
- Forum: Forth
- Topic: Transmogrify stack words into zp register words
- Replies: 3
- Views: 866
- Mon Jan 26, 2026 1:51 pm
- Forum: Forth
- Topic: Transmogrify stack words into zp register words
- Replies: 3
- Views: 866
Transmogrify stack words into zp register words
I wanted to streamline some code like u A ! and A @ for heavily used variables, so I started hand-coding assembly for some inline "register" words that interacted directly with fixed 16-bit zero page cells.
In Taliforth (and I guess many other 6502 forths) we use X as the data stack pointer so ...
In Taliforth (and I guess many other 6502 forths) we use X as the data stack pointer so ...
- Thu Jan 22, 2026 11:18 pm
- Forum: Forth
- Topic: How to write an inlining CONST word?
- Replies: 4
- Views: 503
Re: How to write an inlining CONST word?
yes, i like Garth's idea of adding a couple of primitives too. I think I can speed up the 65c02-on-65c02 emulator a lot with inlined const and some well-chosen bit-twiddling words for all the flag updates. needs a bit of thought about exactly what words tho.
- Thu Jan 22, 2026 11:15 pm
- Forum: Forth
- Topic: How to write an inlining CONST word?
- Replies: 4
- Views: 503
Re: How to write an inlining CONST word?
yes, for Tali. Looks like it automatically does the inlining from the postpone literal already :heart:
42 const fubar ok
fubar . 42 ok
.s <0> ok
: snafu fubar + ; ok
see snafu
...
943 2A lda.#
945 dex
946 dex
947 0 sta.zx
949 1 stz.zx
94B 80BE jsr 2 STACK DEPTH CHECK
94E clc
94F 0 lda.zx
951 2 ...
42 const fubar ok
fubar . 42 ok
.s <0> ok
: snafu fubar + ; ok
see snafu
...
943 2A lda.#
945 dex
946 dex
947 0 sta.zx
949 1 stz.zx
94B 80BE jsr 2 STACK DEPTH CHECK
94E clc
94F 0 lda.zx
951 2 ...
- Thu Jan 22, 2026 12:33 pm
- Forum: Forth
- Topic: How to write an inlining CONST word?
- Replies: 4
- Views: 503
How to write an inlining CONST word?
It seems like CONSTANT words compile a reference to themselves, so the value isn't looked up til run-time.
I guess this allows the value to change before the word executes which is perhaps a benefit in some cases.
I want to make a CONST word which just inlines itself at compile-time, so the value ...
I guess this allows the value to change before the word executes which is perhaps a benefit in some cases.
I want to make a CONST word which just inlines itself at compile-time, so the value ...
- Wed Jan 21, 2026 11:06 pm
- Forum: Forth
- Topic: A 65C02 emulator in TaliForth
- Replies: 7
- Views: 751
Re: A 65C02 emulator in TaliForth
Confirmed that Klaus Dormann's test suite passes with the code as shown above:
- the 6502 functional tests take about 45m to complete at 100MHz. These tests run natively in about 97M cycles. The emulated version takes 264B(!) cycles, an average of 2700 native cycles per emulated cycle, although ...
- the 6502 functional tests take about 45m to complete at 100MHz. These tests run natively in about 97M cycles. The emulated version takes 264B(!) cycles, an average of 2700 native cycles per emulated cycle, although ...
- Wed Jan 21, 2026 12:33 pm
- Forum: Forth
- Topic: A 65C02 emulator in TaliForth
- Replies: 7
- Views: 751
Re: A 65C02 emulator in TaliForth
That's a good idea to use DISASM! I updated the listing above to fix BCD mode and also added a P. word to show status flags which was invaluable while fighting with BCD - what a mess that is. The randomized tests all pass now, still working thru checking Klaus suite tho it is super slow 
- Sun Jan 18, 2026 12:55 pm
- Forum: Forth
- Topic: A 65C02 emulator in TaliForth
- Replies: 7
- Views: 751
Re: A 65C02 emulator in TaliForth
Not yet, just the randomized tests for all wdc opcodes I linked above. That's a good thought tho, might need to implement decimal mode and take a stab at it.
- Sat Jan 17, 2026 11:21 pm
- Forum: Forth
- Topic: A 65C02 emulator in TaliForth
- Replies: 7
- Views: 751
A 65C02 emulator in TaliForth
Emulate the 65C02 in a 65C02 forth, itself running on a 65C02 emulator of course... To illustrate it emulates the assembled version of its own UM* word, as well as passing a large suite of tests.
For some reverse-engineering I wanted some simple logic equations describing each opcode to reason ...
For some reverse-engineering I wanted some simple logic equations describing each opcode to reason ...
- Tue Dec 09, 2025 12:49 am
- Forum: Programming
- Topic: Another FAT32 imlpementation (Pure C)
- Replies: 1
- Views: 592
Re: Another FAT32 imlpementation (Pure C)
in case it's useful I wrote a simple python implementation of prodos8 which makes it easy to create and manage prodos images anywhere python runs.
see https://github.com/patricksurry/pyprodos
i've found this supports a painless build cycle for either simulated or hardware 6502 stuff, especially ...
see https://github.com/patricksurry/pyprodos
i've found this supports a painless build cycle for either simulated or hardware 6502 stuff, especially ...
- Mon Sep 15, 2025 1:41 am
- Forum: Forth
- Topic: The complete Colossal Cave Adventure in 64K!
- Replies: 9
- Views: 2817
Re: The complete Colossal Cave Adventure in 64K!
lol, the keyboard is this nullbits kit, love it!
https://nullbits.co/nibble/
it does in fact *also* have some underglow LEDs which I use to indicate different layers.
it has a more powerful CPU than the breadboard, but i just use it to send ascii keypresses using SPI
https://nullbits.co/nibble/
it does in fact *also* have some underglow LEDs which I use to indicate different layers.
it has a more powerful CPU than the breadboard, but i just use it to send ascii keypresses using SPI
- Tue Sep 09, 2025 10:53 pm
- Forum: Forth
- Topic: The complete Colossal Cave Adventure in 64K!
- Replies: 9
- Views: 2817
The complete Colossal Cave Adventure in 64K!
Here's the result of my latest Forth adventure (see what I did there?). This is a full TaliForth port of the original Colossal Cave Adventure (350pt version) for the 65C02 that runs in just 64K. Thanks to SamCoVT for all the support hacking on the amazing TaliForth code base!
source on github
I ...
source on github
I ...
- Wed Jan 15, 2025 7:47 pm
- Forum: Programming
- Topic: Recommendations for good/small UART file transfer code?
- Replies: 14
- Views: 4097
Re: Recommendations for good/small UART file transfer code?
I ended up implementing >SREC / SREC> words for my taliforth console which makes it easy to paste compiled code snippets thru the terminal.
just for fun i'm also trying a very simple delta-coding thing so I can generate small binary patches with respect to the code that's already in the eeprom ...
just for fun i'm also trying a very simple delta-coding thing so I can generate small binary patches with respect to the code that's already in the eeprom ...
- Wed Dec 25, 2024 12:17 pm
- Forum: Programming
- Topic: R. Ford Denison's 2KSA
- Replies: 10
- Views: 3312
Re: R. Ford Denison's 2KSA
For simplicity I added the generated .asm code to the repo as well as updating the author info. Happy holidays all.
- Mon Dec 23, 2024 9:04 pm
- Forum: Programming
- Topic: R. Ford Denison's 2KSA
- Replies: 10
- Views: 3312
Re: R. Ford Denison's 2KSA
Great sleuthing - that is indeed him, and he is happy to share for educational use:
.. Yes, I wrote the 2KSA when I was *supposed* to be writing my PhD thesis on nitrogen fixation in soybeans. Forty-some years later, I'm still using microcomputers (Raspberry Picos running Python) to study nitrogen ...
.. Yes, I wrote the 2KSA when I was *supposed* to be writing my PhD thesis on nitrogen fixation in soybeans. Forty-some years later, I'm still using microcomputers (Raspberry Picos running Python) to study nitrogen ...