I've added a build for the 8085 CPU using sccz80, and also allowed the z80 build to use the z88dk-zsdcc compiler. The zsdcc compiler produces a slightly smaller binary in this case. Always interesting to compare.
Adding the #pragma printf further reduces the binary size as some format converters can be omitted.
As sdcc is a little finicky and pedantic there are a few extra casts here and about, and it has its own assembly indicators just to make life fun.
z88dk uses the same return registers (hl) as does CP/M BDOS so returns don't need to be juggled from the a register.
Converted some code to use the l_jphl sccz80 intrinsic function, as there is no z80 call (hl) instruction. sdcc doesn't have this as an intrinsic function (present in the crt0 header code), so there's also a library version that will be linked in as needed.
Seems to work as intended, but noted that I've only 4 drive machines. So it would be useful to test further.
Hope this is useful.
I've added a build for the 8085 CPU using sccz80, and also allowed the z80 build to use the z88dk-zsdcc compiler. The zsdcc compiler produces a slightly smaller binary in this case. Always interesting to compare.
Adding the
#pragma printf
further reduces the binary size as some format converters can be omitted.As sdcc is a little finicky and pedantic there are a few extra casts here and about, and it has its own assembly indicators just to make life fun.
z88dk uses the same return registers (
hl
) as does CP/M BDOS so returns don't need to be juggled from thea
register.Converted some code to use the
l_jphl
sccz80 intrinsic function, as there is no z80call (hl)
instruction. sdcc doesn't have this as an intrinsic function (present in thecrt0
header code), so there's also a library version that will be linked in as needed.Seems to work as intended, but noted that I've only 4 drive machines. So it would be useful to test further. Hope this is useful.