Z80 Routines:Optimized:StrCopy

From WikiTI
Revision as of 01:59, 9 November 2009 by Galandros (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


StrCopy:
;Copy zero terminated string at HL to DE.
;Destroys AF, DE, HL
	xor	a		;4
docopystr:
	cp	(hl)		;7
	ldi			;16
	jr	nz,docopystr	;12
	ret			;5

Change jr to jp to save a couple clocks and add a byte.