Z80 Routines:Optimized:CpHLDE

From WikiTI
Revision as of 19:47, 25 October 2009 by Galandros (talk | contribs) (Routines:Optimized:CpHLDE moved to Z80 Routines:Optimized:CpHLDE: unite z80 routines)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


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