; TITLE "SMTH10A - Syslib 4.0" NAME ('CMPH') ;================================================================= ; The Libraries, Version 4, (C) 1989 by Alpha Systems Corp. ;----------------------------------------------------------------- ; Author : Harold F. Bower ; Derived from SMTH10.Z80 Ver 1.1 by Richard Conn ; Date : 17 Sep 89 ; Version : 1.2 ; Module : SMTH10A ; Abstract: This module contains the routine CMPH which returns ; the One's Complement of the 16-bit value in the HL register. ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC CMPH .Z80 CSEG ;=============================================================== ; NAME - CMPH ; Entry: - The value to be 1's complemented ; Exit : - The complemented value ; ,, - Preserved ; Special Requirements: None ;=============================================================== CMPH: PUSH AF ; Save A and Flags LD A,L ; Complement Low byte CPL LD L,A LD A,H ; Complement High byte CPL LD H,A POP AF ; Restore A and Flags RET END