jayacotton / find

A find command for cp/m written in C
9 stars 1 forks source link

find - add zsdcc z80 and sccz80 8085 builds for CP/M #9

Closed feilipu closed 2 years ago

feilipu commented 2 years ago

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.

jayacotton commented 2 years ago

Include Stevens work.

jayacotton commented 2 years ago

pull in work that steven has be doing