Z80 Routines:Optimized:CpHLDE: Difference between revisions

From WikiTI
Jump to navigationJump to search
No edit summary
 
Galandros (talk | contribs)
 
(No difference)

Latest revision as of 19:47, 25 October 2009


This is a faster/smaller replacement for the typical CpHLDE routine.

Typical routine:

CpHLDE:
  push hl
  or a
  sbc hl,de
  pop hl
  ret

Better routine:

CpHLDE:
  or a
  sbc hl,de
  add hl,de
  ret