Skip to content

Back On the Rails – Lesson Learned?

December 21, 2015

Somewhere in the changes I made to the monitor I had savagely goobered the serial output routine.  I went back to josh’s baseline source and made the fewest changes I could to get the bootloader working, run without the front panel, and give me access to the output port.  Apparently all is forgiven.  I’ll have to carefully save my work today and get back to it in january.

Compare: (<)C:\Users\Bill\Desktop\olduinoZ\ozmon\oz2_151221.asm (137080 bytes)
   with: (>)C:\Users\Bill\Desktop\olduinoZ\ozmon\baseline\ZMCv11.asm (136910 bytes)

< ;Z80 Membership Card Firmware, Beta Version 1.1, Dec 14, 2014
< ;File: OZ2_151221.asm
< ;
< 	DB	CR,LF,"Z80 MEMBERSHIP CARD.  Olduino_2, Dec 21, 2015",CR,LF,EOS
> ;Z80 Membership Card Firmware, Beta Version 1.1, Dec 14, 2014
> ;File: ZMCv10.asm
> ;
> 	DB	CR,LF,"Z80 MEMBERSHIP CARD.  Beta v1.1, Dec 14, 2014",CR,LF,EOS
< 		JP	RTHW_FP_PRESENT	;OZ2_151221 was:	JP	Z,0x8002	;Execute RAM
> 		JP	Z,0x8002	;Execute RAM
< 		CALL	bootpatch	;OZ2_151221 call to bootloader - was CALL SEL_RS232
> 		CALL	SEL_RS232
< PURGE		LD	A,1	;OZ2_151221 was 2	;2 seconds for time out
> PURGE		LD	A,2	;2 seconds for time out
< PC_LP0		NOP		;OZ2_151221 was:	INC E
< 	org	0x1800
< 	include

I ran the dhrystone benchmark which took about 4 seconds for 1000 passes – 250 dhrystones/second.  That’s very close to what’s published on the z88dk web site.  As noted previously, the equivalent for a 4mhz 1802 with the rhinestone compiler is about 65 dhrystones/second.  The factor of four makes sense to me because each 1802 instruction is 16 cycles vs maybe 8 for the z80 and the 1802 will take at least two times as many instructions as the z80 because it’s all single byte instructions and generally everything has to go through the accumulator.

The compiled code for the Z80 rings in a bit smaller than the 1802 at around 13,000 bytes vs 14,000. both dominated by the space for a 5000 byte array.  The 1802 module has all its library compiled into it where the Z80 code has only what it needs.

I still much prefer the 1802 machine language but it would need to be running at 16-20mhz to give the z80 a run for its money.


From → Olduino/Z

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: