; ; compare hl and de (unsigned) ; if de > hl then z reset, carry set ; if de = hl then z set, carry clear ; if de < hl then z reset, carry clear ; (organized like "cmp r", using hl as accumulator) ; f .dcmp:: push h push psw mov a,h cmp d jnz dcmp1 mov a,l cmp e dcmp1: pop h mov a,h; restore a, keep flags pop h ret