; TITLE "SMTH07 - Syslib 4.0" NAME ('ANDHD') ;================================================================= ; The Libraries, Version 4, (C) 1989 by Alpha Systems Corp. ;----------------------------------------------------------------- ; Author : Richard Conn ; Date : ; Version : 1.1 ; Module : SMTH07 ; Abstract: This module contains the routine ANDHD which "AND"s ; the 16-bit values in two registers and returns the result. ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC ANDHD .Z80 CSEG ;=============================================================== ; NAME - ANDHD ; Entry: HL,DE - Contain 16-bit values to be ANDed ; Exit : HL - Contains the resultant value ; Uses : HL ; Special Requirements: None ;=============================================================== ANDHD: PUSH AF ; Save A and Flags LD A,L ; Do Low byte AND E LD L,A LD A,H ; Do High byte AND D LD H,A POP AF ; Restore A and Flags RET END