;Library Name: ARRAYLIB ;Module Name: DOBLOCK ;Author: Al Hawley ;Date: 31 Mar 1987 ;Version number: 1.0c ;Version History: ;Program Function: ARRAYLIB is a collection of subroutines which ; implement the management of byte arrays in programs written ; for Z80 or HD64180 based computers. This module is one of the ; set, and may require the presence of others. ;*************************************************** ; COPYRIGHT NOTICE ;ARRAYLIB is copyright by A. E. Hawley on March 4, 1987. ;It may be freely distributed, but it must not be sold ;either separately or as part of a package without the ;written consent of the author. The author may be reached ;via electronic mail at the Ladera Z-Node in Los Angeles, ;213-670-9465, or by Voice Phone at: 213-649-3575 ; ;*************************************************** MACLIB ARRHDR name doblock ;This module contains the following routines: public ardoblok ;..and uses the following external routines: ext arrc1$c2 ardoblok: ;visit a rectangular block of array elements ;performing a function that has been defined by ;a call to arvisiti: ;on entry, ; b = first row in block ; c = first column in block ; d = last row in block ; e = last column in block ;on exit, ;registers preserved: c, de ;normal return: carry flag = nc, a=0 ;test needed to make sure end addr >= start addr blockl: push bc push de call arrc1$c2 ;do a row segment ;if cy set, an error code is in A. pop de pop bc ret c ;ret if error reported by arrc1$c2 inc b ;next row ld a,d cp b ;see if b is >d jr nc,blockl xor a ;return no error (nc) ret ;********************************************** end