home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / JSAGE / ZSUS / PROGPACK / ARRAYS10.LBR / ARRAY5.ZZ0 / ARRAY5.Z80
Text File  |  2000-06-30  |  3KB  |  83 lines

  1. ;Library Name: ARRAYLIB
  2. ;Module Name: USENDR
  3. ;Author: Al Hawley
  4. ;Date: 31 Mar 1987
  5. ;Version number: 1.0c
  6.  
  7. ;Version History:
  8.     
  9. ;Program Function: ARRAYLIB is a collection of subroutines which
  10. ;    implement the management of byte arrays in programs written
  11. ;    for Z80 or HD64180 based computers. This module is one of the
  12. ;    set, and may require the presence of others.
  13.  
  14. ;***************************************************
  15. ;        COPYRIGHT NOTICE
  16. ;ARRAYLIB is copyright by A. E. Hawley on March 4, 1987.
  17. ;It may be freely distributed, but it must not be sold 
  18. ;either separately or as part of a package without the 
  19. ;written consent of the author.  The author may be reached 
  20. ;via electronic mail at the Ladera Z-Node in Los Angeles,
  21. ;213-670-9465, or by Voice Phone at: 213-649-3575
  22. ;
  23. ;***************************************************
  24.  
  25.     MACLIB    ARRHDR
  26.  
  27.     name usendr
  28. ;This module contains the following routines:
  29.     public arrndrdu
  30. ;..and uses the following external routines:
  31.     ext arrfr0$e,arxltbit,arrxltrc,arsetbit
  32.     ext getndre,gtnxtdu
  33.  
  34. arrndrdu:
  35. ;initialize a 64 byte array from the drive-user
  36. ;assignments in the system named directory
  37. ;the array must have been previously defined by
  38. ;a call to ARRAYDEF. only those bit positions in the
  39. ;array are set which correspond to d/u entries
  40. ;found in the current ndr. all others are reset.
  41.  
  42.     xor    a        ;make null for...
  43.     call    arrfr0$e    ;init array to nulls
  44.     ret    c        ;ret if error, code in A
  45.     call    getndre        ;return pointer to NDR in HL
  46.     ret    c        ;ret if error, code in A
  47.     ld    (curloc),hl    ;pass it to NDR access routine
  48.  
  49. ndrdu1:    call    gtnxtdu        ;retrieve next DU from NDR
  50.     ret    z        ;return if no more entries
  51.     dec    b        ;convert drive(1-16) to Row(0-15)
  52.  
  53.     call    arxltbit    ;->row, col, offset in e
  54.     ret    c        ;ret if error, code in A
  55.     call    arrxltrc    ;r,c -> addr in hl
  56.     ret    c        ;ret if error, code in A
  57.     ld    a,e        ;get bit offset
  58.     call    arsetbit    ;set the bit for drv/user
  59.     jr    ndrdu1        ;continue 'til no more entries
  60.  
  61. ;**********************************************
  62.  
  63.     IF    ZAS
  64.     COMMON            ;common block for ZAS
  65.     ELSE
  66.     COMMON    /ADATA/        ;common block for M80, SLR
  67.     ENDIF
  68.  
  69. ;COMMON data area - contains default values for a 64
  70. ;byte array useful for disk/user bitmapping.
  71. bitmap:    ds    2    ;..filled in by ARRAYDEF
  72. hicol:    ds    2    ;default is 4 columns: 0,1,2,3
  73. hirow:    ds    2    ;default is 16 rows (0....15)
  74. dumaplen:
  75.     ds    2    ;default is (3+1)*(15+1)
  76.  
  77. maxdu:    ds    2    ;transient d/u data
  78. curloc:    ds    2    ;NDR entry pointer
  79.  
  80. ;**********************************************
  81.  
  82.     end
  83.