Re:Z80 arithmetic: also surprisingly terrible (2018)
by Sharlin on Monday January 14, 2019 @06:43AM
(#18902307)
Well, it is artificial in the sense that it's meant to be code emitted by the code generator of a compiler for a high-level language with very different idioms. And the architectures of these early microcomputers obviously don't exactly prioritize being easy compiler targets.
[ Parent
| on HN ]
Re:Z80 arithmetic: also surprisingly terrible (2018)
by userbinator on Monday January 14, 2019 @07:32AM
(#18902501)
Here's a sample of compiled Z80 code (the bootloader for one of these: https://en.wikipedia.org/wiki/S1_MP3_player ) generated by a C compiler --- of course, a commercial one and not a cheap one at that (IAR Embedded Workbench for Z80.) You can see that it has absolutely no problem using nearly all the registers: