home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / m2 / CycloneModules.lha / modules / txt / Misc.def < prev    next >
Text File  |  1996-08-01  |  1KB  |  48 lines

  1. (*
  2. **    Cyclone Modula-2 Interface module:
  3. **    $VER: misc.h 36.13 (6.5.90)
  4. **    Includes Release 40.15
  5. **
  6. **    Unit number definitions for "misc.resource"
  7. **
  8. **    (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  9. **        All Rights Reserved
  10. **
  11. **      Interface module by Marcel Timmermans
  12. **      (C) Copyright 1995-1996 Marcel Timmermans
  13. **          All Rights Reserved
  14. *)
  15.  
  16. (*$ Implementation- *)
  17. DEFINITION MODULE Misc;
  18.  
  19. FROM SYSTEM IMPORT ADDRESS;
  20.  
  21. IMPORT Reg;
  22.  
  23. CONST
  24.  
  25. (*
  26.  * Unit number definitions.  Ownership of a resource grants low-level
  27.  * bit access to the hardware registers.  You are still obligated to follow
  28.  * the rules for shared access of the interrupt system (see
  29.  * exec.library/SetIntVector or cia.resource as appropriate).
  30.  *)
  31.   serialPort   = 0; (* Amiga custom chip serial port registers
  32.                          (SERDAT,SERDATR,SERPER,ADKCON, and interrupts) *)
  33.   serialBits   = 1; (* Serial control bits (DTR,CTS, etc.) *)
  34.   parallelPort = 2; (* The 8 bit parallel data port
  35.                          (CIAAPRA & CIAADDRA only!) *)
  36.   parallelBits = 3; (* All other parallel bits & interrupts
  37.                          (BUSY,ACK,etc.) *)
  38.  
  39.   miscName = "misc.resource";
  40.  
  41. PROCEDURE AllocMiscResource(misc{Reg.A6}:ADDRESS;
  42.                     unitNum{Reg.D0}:LONGINT;name{Reg.A1}:ADDRESS):ADDRESS; CODE -6;
  43.  
  44. PROCEDURE FreeMiscResource(misc{Reg.A6}:ADDRESS;unitNum{Reg.D0}:LONGINT); CODE -12;
  45.  
  46.  
  47. END Misc.
  48.