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 / ARRAY9.ZZ0 / ARRAY9.Z80
Text File  |  2000-06-30  |  2KB  |  57 lines

  1. ;Library Name: ARRAYLIB
  2. ;Module Name: SETDU
  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 setdu
  28. ;This module contains the following routines:
  29.     public arrsetdu
  30. ;..and uses the following external routines:
  31.     ext arxltbit,arrxltrc,arresbit,arsetbit
  32.  
  33. arrsetdu:
  34. ;set the bit corresponding to disk/user to 0
  35. ;or 1, according to the value in reg a.
  36. ;on entry,
  37. ;    a    = 00 or >0
  38. ;    bc    = disk, user
  39. ;on exit,
  40. ;    bit at du is set(1) if a was non-zero
  41. ;    bit at du is reset(0) if a was zero
  42. ;all registers are destroyed
  43.  
  44.     ex    af,af'
  45.     dec    b        ;convert disk to row(0..)
  46.     call    arxltbit
  47.     call    arrxltrc    ;addr in hl, bit loc in e
  48.     ex    af,af'
  49.     or    a        ;was reg a 0?
  50.     ld    a,e
  51.     jp    z,arresbit    ;reset bit if a was 0
  52.     jp    arsetbit    ;else set the bit
  53.  
  54. ;**********************************************
  55.  
  56.     end
  57.