I've been working on porting supermon816 to a Commodore PET clone using a 65816. Here's some notes / comments:
- There's an awful lot of zeropage usage. So I'll set the DP pointer to some free space (actually planning to use page 1, and use the lower half of the stack space for the about 64 bytes of used zp) I found that moving some of those out of zeropage increases overall length of the binary over the desired limit...
- Is clearing the "workspace" required for proper operation? Otherwise this code could be left out.
- How much variable space could potentially be combined? (maybe moot as DP can be relocated)
- I think the entry points should be separated out more: I am not sure setting the brk vector belongs into the monitor proper - maybe good for some 816 systems, but what on systems that do not behave like specified in the comment of that routine?
- vecbrkia is in the middle of the binary - so this prevents write-protecting the address space used for the monitor itself. This should probably also be left to the "outer shell" or "binding" to the host system?
- Some weird kowalski assembler syntax I had to adapt. How active is this assembler actually? Does it make sense to move to another assembler altogether?
I'll keep you posted.
Anyway, here is the repo:
https://github.com/fachat/upet_supermon816André
_________________
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content:
http://6502.org/users/andre/