Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange RTS behaviour #272

Open
svhum opened this issue Nov 22, 2022 · 1 comment
Open

Strange RTS behaviour #272

svhum opened this issue Nov 22, 2022 · 1 comment

Comments

@svhum
Copy link

svhum commented Nov 22, 2022

First, I want to say that this is a really great project!

I am encountering a strange issue using the assembler on actual 65C02 hardware. I'm using a simple SBC I built that has the memory map recommended in the TaliForth documentation, with the ROM at $8000 and kernel at $E000. I use a modified wozmon as the monitor (that uses a UART for I/O instead of Apple hardware) in the remaining kernel memory space, and a UART at $F000. So far, TaliForth seems to run as expected except when using the assembler.

The issue I'm having is using the RTS word in the assembler. In py65mon, the following works as expected:

here .s <1> 2048  ok
rts .s <1> 2048  ok
execute .s <0>  ok

However, for some reason on the SBC, RTS consumes what is on the stack:

here .s <1> 2048  ok
rts .s <0>  ok

This will obviously prevent a subsequent execute word from running.

I am wondering if this has something to do with how TaliForth is run from the monitor somehow (i.e. E000 R), but can't pinpoint why this would be.

@SamCoVT
Copy link
Contributor

SamCoVT commented Nov 22, 2022

Hi @svhum,
I've taken over maintenance of TaliForth2 (just a few days ago) and I've copied your issue over to:
"https://github.com/SamCoVT/TaliForth2/issues/5"
Also, you'll likely want to change your upstream over to my repository to get bugfixes:
https://github.com/SamCoVT/TaliForth2
If you are using the Ophis assembler, you will want the master-ophis branch and if you are using 64tass, you will want the master-64tass branch. The latter is the default branch in my repository and is where new development will take place, but I backport any bug fixes to the ophis branch as well.

I don't have permissions to close this ticket (so it may stay open for a while), but I will help you over at my repository and hopefully we can get this issue resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants