home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / OB3.2D3.DMS / in.adf / Interfaces / Misc.mod < prev    next >
Encoding:
Text File  |  1992-12-17  |  1.6 KB  |  50 lines

  1. (*-------------------------------------------------------------------------*)
  2. (*                                                                         *)
  3. (*  Amiga Oberon Interface Module:                    Date: 02-Nov-92      *)
  4. (*                                                                         *)
  5. (*   © 1992 by Fridtjof Siebert                                            *)
  6. (*                                                                         *)
  7. (*-------------------------------------------------------------------------*)
  8.  
  9. MODULE Misc;
  10.  
  11. IMPORT e * := Exec;
  12.  
  13.  
  14. CONST
  15.  
  16. (*
  17.  * Unit number definitions.  Ownership of a resource grants low-level
  18.  * bit access to the hardware registers.  You are still obligated to follow
  19.  * the rules for shared access of the interrupt system (see
  20.  * exec.library/SetIntVector or cia.resource as appropriate).
  21.  *)
  22.   serialPort   * = 0; (* Amiga custom chip serial port registers
  23.                          (SERDAT,SERDATR,SERPER,ADKCON, and interrupts) *)
  24.   serialBits   * = 1; (* Serial control bits (DTR,CTS, etc.) *)
  25.   parallelPort * = 2; (* The 8 bit parallel data port
  26.                          (CIAAPRA & CIAADDRA only!) *)
  27.   parallelBits * = 3; (* All other parallel bits & interrupts
  28.                          (BUSY,ACK,etc.) *)
  29.  
  30.   miscName * = "misc.resource";
  31.  
  32.  
  33. VAR
  34.  
  35. (*
  36.  *  You have to put a pointer to the misc.resource here to use the misc
  37.  *  procedures:
  38.  *)
  39.  
  40.   base * : e.APTR;
  41.  
  42.  
  43. PROCEDURE AllocMiscResource *{base,-  6}(unitNum{0}  : LONGINT;
  44.                                          name{9}     : ARRAY OF CHAR): e.APTR;
  45. PROCEDURE FreeMiscResource  *{base,- 12}(unitNum{0}  : LONGINT);
  46.  
  47. END Misc.
  48.  
  49.  
  50.