On Sun, 09 Apr 2017 18:55:31 +0000
"John R. Hogerhuis" <[email protected]> wrote:
> So are you building the Small C to run on the m100 or are you
> building a target compiler?
It's a cross compiler. Back in the Elder Days Small C could compile
itself but 1)I don't know if that's still true and 2)it would want a
far more normal C lib than what I've created.
>
> You inspired me to look up SDCC which is a retargetable target
> compiler. It doesn't have a 8085 (or 8080) code generator. But I've
> been fiddling with converting the z80 code generator.
Different branch of the same family. For your sake, I hope the
insides are better commented. Anyway, what SDCC needs is a WP-2
library. (hint hint ;-)
And at any rate, I don't know what assembler SDCC compiles for. If it's
not ASx you're on your own there. Also it might not use the same
calling conventions as SmallC-85, in which case you're also on your
own. :-)
>
> If I ever get it working I may be able to reuse the m100 library
> you're creating.
When I first saw the 8085 undocumented instructions, I was mildly
confused by them. Why would you want to (for instance) load DE with SP
plus an offset? Now I understand, these instructions are to make a
compiler's life easier! LDSI and LHLX are a very useful pair and I wish
I had them on Z80! ("What do you mean I can't ld hl,(de)?!?!??!")
(OTOH I accidently used dec b instead of dcr b and when as8085
complained I was all "Well pardon my Zilog!")
>
> -- John
Willard
--
Willard Goosey [email protected]
Socorro, New Mexico, USA
I search my heart and find Cimmeria, land of Darkness and the Night.
-- R.E. Howard