开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Re: using SDCC and stdio to Z80MC w/ CP/M 2.2....


 

yes, indeed, SDCC is PC based, and may not be to the taste of those wishing to be period-accurate and develop on the target systems.? I imagine the vintage compilers are all K&R style?? I should try it out that way to appreciate the feel.? I did trivially hack the rom to make the power-on default 115200 bps.
?
My coming to this was somewhat roundabout, as I had used SDCC for other things before.? I needed to adapt crt0 for the board, and malloc didn't act the way I wanted, and then I got carried away with stdio (well, the missing FILE* stuff), hence the post if others had curiousity and wanted to save the trouble.? One can enjoy taking such excursions when it is not a paid effort for a client; lol!
?
The generated code can be quite fluffy.? I guess that's what you get for the conveniences of the language on a 8-bitter.? (can't imagine the generated code for a 6502)
?
I punted on scanf for the time being, but now I am distracted by thoughts of supporting the bank switching mechanism.? I suspect I would need to make some tool to plan linkage from the collection of object modules, and possibly generating thunks in non-paged memory.? Seems like a graph theory problem.

Anyway, some short term work popped up last week that will absorb me for the next 4 weeks, so I'll have to wait a bit for all that, alas.
?
I'll check out the book you mention -- CP/M is definitely new to me.? Fortunately systems' surface area tended to be smaller back then.

cheers!
-dave

Join Z80MC@groups.io to automatically receive all group messages.