home *** CD-ROM | disk | FTP | other *** search
- ;Library Name: ARRAYLIB
- ;Module Name: USENDR
- ;Author: Al Hawley
- ;Date: 06 Mar 1987
- ;Version number: 1.0a
- ;Previous version: 1.0 dated 4 March 1987
-
- ;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 U.S. Mail at:
- ;
- ; 6032 Chariton Ave.
- ; Los Angeles, CA. 90056
- ; Voice Phone: 213-649-3575
- ;
- ; RELEASE NOTICE
- ;ARRAYLIB is released for beta test through the Z-system
- ;users group Z-SIG. It may be reached through the
- ;Lillipute Z-Node in Chicago, 312-649-1730.
-
- ;***************************************************
-
- name usendr
- ;This module contains the following routines:
- public arrndrdu
- ;..and uses the following external routines:
- ext arrfr0$e,arxltbit,arrxltrc,arsetbit
- ext getndre,gtnxtdu
-
- arrndrdu:
- ;initialize a 64 byte array from the drive-user
- ;assignments in the system named directory
- ;the array must have been previously defined by
- ;a call to ARRAYDEF. only those bit positions in the
- ;array are set which correspond to d/u entries
- ;found in the current ndr. all others are reset.
-
- xor a ;make null for...
- call arrfr0$e ;init array to nulls
- ret c ;ret if error, code in A
- call getndre ;return pointer to NDR in HL
- ret c ;ret if error, code in A
- ld (curloc),hl ;pass it to NDR access routine
-
- ndrdu1: call gtnxtdu ;retrieve next DU from NDR
- ret z ;return if no more entries
- dec b ;convert drive(1-16) to Row(0-15)
-
- call arxltbit ;->row, col, offset in e
- ret c ;ret if error, code in A
- call arrxltrc ;r,c -> addr in hl
- ret c ;ret if error, code in A
- ld a,e ;get bit offset
- call arsetbit ;set the bit for drv/user
- jr ndrdu1 ;continue 'til no more entries
-
- ;**********************************************
- COMMON /ARDAT/
-
- ;COMMON data area - contains default values for a 64
- ;byte array useful for disk/user bitmapping.
- bitmap: dw 0 ;..filled in by ARRAYDEF
- hicol: dw 3 ;4 columns: 0,1,2,3
- hirow: dw 15 ;16 rows (0....15)
- dumaplen:
- dw 64 ;(3+1)*(15+1)
-
- maxdu: dw 0 ;transient d/u data
- curloc: dw 0 ;NDR entry pointer
-
- ;**********************************************
-
- end
-