drogon wrote:
BitWise wrote:
WDC's 816 compiler generates OK code and unlike the 65C02 compiler does not crash when encountering an error.
The free copy doesn't include the assembler source for the startup module but you can get the code you need from this project.
https://github.com/andrew-jacobs/w65c816sxb-cdemo.
Try to avoid using stdio.h functions if you want a small program.
Although I've now completely moved away from C on the '816 there is a small task I'm looking at where C may be better than the BCPL I'm currently using, but the question I have is; Does it provide some sort of loader to help move code segments into the correct banks before program startup, or is this what the startup module is for?
Thanks,
-Gordon
I've not tried it but the linker supports building a image that contains relocatable code/data that is built for a different area (-C18000,8000 => link as if at $01:8000 but place at $00:8000 -- same for data with -Dxxxx,yyyy). You'd have to a write a custom startup module to use the addresses provided by the linker (during linking) to create a lda #/ldx #/ldy #/mvn code sequence that relocates code and the same for initialised data.