Closed twoinke closed 4 years ago
@SamCoVT Wouldn't this be of use to you as well? If I remember, bye doesn't really do anything useful on your hardware right now.
On my hardware, Tali Forth 2 is the OS, so I just don't use bye
.
We can make the word BYE
jump to a label in the platform file, and move the BRK for py65mon there in the default platform file (with a comment describing what's going on). That way the Steckschwein folks can either put their own code at that label or just .alias
the label to their jump target address in their platform file. If we're trying to leave 8K in the ROM memory map (assuming 32K RAM/32K ROM) for people to put their own code, it seems quite reasonable to provide an easy way to get back there.
Sounds good to me.
@twoinke Do you want to go ahead and see about changing this, since you're the most affected and can test it with an actual on-board OS?
@scotws I'll give it a shot.
@twoinke Thank you, I'll try to get on it at the weekend!
@twoinke Sorry this is taking longer than expected, the mobo of my NAS died and I'm using the occasion to move everything from FreeNAS to Ubuntu Server with Docker. Once I've done wading in ZFS pools and bricked up the firewall I'll be right back.
I believe this has already been handled with the platform_bye:
label in the platform files. The only thing I can see left to do is to add some documentation about this label, either in the manual or in the platform files (or both). If you don't have time to finish that up, you can assign it to me and we can get this issue closed.
Oops, we've done this. Thanks!
Currently, BYE executes a BRK instruction which causes py65 to execute the ml-monitor. On real hardware however, BRK is not a common way to exit and return to wherever TaliForth2 has been invoked from. SteckOS for example provides a return vector as jump target, which takes care of a safe return to the OS. Another common way is to invoke programs via JSR in order to be able to return using RTS.
Long story short, it would be nice if BYE behaviour could be customized in the platform specific files.