home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / asmutl / buffers.lbr / DCMP.MAC < prev    next >
Encoding:
Text File  |  1987-01-15  |  384 b   |  19 lines

  1. ;
  2. ; compare hl and de (unsigned)
  3. ; if de > hl then z reset, carry set
  4. ; if de = hl then z set,   carry clear
  5. ; if de < hl then z reset, carry clear
  6. ; (organized like "cmp r", using hl as accumulator)
  7. ; f
  8. .dcmp::    push    h
  9.     push    psw
  10.     mov    a,h
  11.     cmp    d
  12.     jnz    dcmp1
  13.     mov    a,l
  14.     cmp    e
  15. dcmp1:    pop    h
  16.     mov    a,h;        restore a, keep flags
  17.     pop    h
  18.     ret
  19. çï