; TITLE "SMTH06 - Syslib 4.0" NAME ('SHFTRH') ;================================================================= ; The Libraries, Version 4, (C) 1989 by Alpha Systems Corp. ;----------------------------------------------------------------- ; Author : Harold F. Bower ; Derived from SMTH06.Z80 Ver 1.1 by Richard Conn ; Date : 17 Sep 89 ; Version : 1.2 ; Module : SMTH06 ; Abstract: This module contains the routine SHFTRH which ; shifts the contents of the HL register pair one bit ; position to the right. A zero is shifted into Bit 7 ; of the H register, and Bit 0 of the L register is ; shifted into the Carry flag. ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC SHFTRH .Z80 CSEG ;=============================================================== ; NAME - SHFTRH ; Entry: HL - Contains the 16-bit value to be shifted ; Exit : HL - Contains the shifted value ; F - The Carry flag contains the bit shifted out ; Uses : F,HL ; Special Requirements: None ;=============================================================== SHFTRH: SRL H ; Shift H right with zero fill, LSB to carry RR L ; Shift L right w/carry into MSB, LSB to carry RET END