; TITLE "SMTH02 - Syslib 4.0" NAME ('SUBHD') ;================================================================= ; The Libraries, Version 4, (C) 1989 by Alpha Systems Corp. ;----------------------------------------------------------------- ; Author : Harold F. Bower ; Derived from SMTH02.Z80 Ver 1.1 by Richard Conn ; Date : 17 Sep 89 ; Version : 1.2 ; Module : SMTH02 ; Abstract: This module contains the routine SUBHD which sub- ; tracts the 16-bit value in the DE register from the ; 16-bit value in the HL register. A flag is set if Under- ; flow (borrow) occurred. ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC SUBHD .Z80 CSEG ;=============================================================== ; NAME - SUBHD ; Entry: HL,DE - Contain 16-bit unsigned values ; Exit : F - Carry Set (C) if HL < DE, else Reset (NC) ; HL - Contains (HL)-(DE) ; Uses : F,HL ; Special Requirements: None ;=============================================================== SUBHD: OR A ; Clear carry flag SBC HL,DE ; Perform 16-bit subtraction RET END