Z80 V 1802: 1802 Wins the First Round
The first rule of winning a benchmark smackdown is that you have to be able to compile the code!
When I dug up the Dhrystone benchmark and compiled it using LCC1802 I was surprised at how easy it was to get working. The only thing I had to do was get rid of operating system specific calls and all the code just compiled. No such luck with SDCC and the Z80. I’ve had to go through and take out all the old-style K&R definitions, make a bunch of function prototypes, and various other thingies. Also, SDCC can’t do structure assignments so i’m accommodating that. I guess this reflects that SDCC is a more modern compiler while LCC1802 still has its dinosaur roots showing.
Once I got the errors mostly cleared I’ve tried running it but no output so far. Seems to be a problem in printf(). I’ll have to keep poking.
UPDATE: The problem is an error in one of my updates to the monitor. I had made a message longer which messed up some addresses.