; TITLE "SCOMPHD - Syslib 4.0" NAME ('COMPHD') ;================================================================= ; The Libraries, Version 4, (C) 1989 by Alpha Systems Corp. ;----------------------------------------------------------------- ; Author : Richard Conn ; Date : ; Version : 1.0 ; Module : SCOMPHD ; Abstract: This module contains the routine COMPHD which compares ; the contents of DE with HL. Flags are set showing the ; relationship. ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC COMPHD .Z80 CSEG ;=============================================================== ; NAME - COMPHD ; Entry: HL - First 16-bit value to compare ; DE - Second 16-bit value to compare ; Exit : F - Zero Set (Z) = Equality, Carry Set (C) = HL < DE ; Uses : AF ; Special Requirements: None ;=============================================================== COMPHD: LD A,H ; Compare High CP D RET NZ ; If not Zero, flags set and return LD A,L ; Compare Low CP E RET ; Return with flags set END