; TITLE "SFILL2 - Syslib 4.0" NAME ('HFILB') ;================================================================= ; The Libraries, Version 4, (C) 1989 by Alpha Systems Corp. ;----------------------------------------------------------------- ; Author : Harold F. Bower ; Derived from SFILL.Z80 Ver 1.1 by Richard Conn ; Date : 11 Jun 89 ; Version : 1.3 ; Module : SFILL2 ; Abstract: This module provides the routine HFILB which provides ; a means of filling up to 256 bytes of memory with a ; constant value. The memory pointer in points to the byte ; after the last one filled upon exitting. ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC HFILB .Z80 CSEG ;=============================================================== ; NAME - HFILB ; Entry: HL - Points to the first byte to fill ; B - Contains the number of locations to fill ; A - Contains the value to fill ; Exit : HL - Points to location after last one filled ; Uses : HL ; Special Requirements: If Reg B contains 0, 256 locations will ; be filled. ;=============================================================== HFILB: PUSH BC ; Save BC HFILB0: LD (HL),A ; Store the byte INC HL ; ..bump pointer DJNZ HFILB0 ; Loop til done POP BC ; Restore BC RET END