public fill ; Fill memory pointed to by DE with character in A for B bytes fill: inc b dec b ret z ;don't do 0 bytes. Overflow! fillup: ld (de),a ; Fill with byte in A inc de ; Point to next djnz fillup ret end