home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / languages / obrn-a_1.5_lib.lha / oberon-a / source2.lha / source / amiga / Misc.mod < prev    next >
Encoding:
Text File  |  1995-01-26  |  2.0 KB  |  78 lines

  1. (**************************************************************************
  2.  
  3.      $RCSfile: Misc.mod $
  4.   Description: Interface to misc.resource
  5.  
  6.    Created by: fjc (Frank Copeland)
  7.     $Revision: 3.7 $
  8.       $Author: fjc $
  9.         $Date: 1995/01/26 02:39:55 $
  10.  
  11.   Includes Release 40.15
  12.  
  13.   (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  14.       All Rights Reserved
  15.  
  16.   Oberon-A interface Copyright © 1994-1995, Frank Copeland.
  17.   This file is part of the Oberon-A Interface.
  18.   See Oberon-A.doc for conditions of use and distribution.
  19.  
  20. ***************************************************************************)
  21.  
  22. <* STANDARD- *> <* INITIALISE- *> <* MAIN- *>
  23. <*$ CaseChk-  IndexChk- LongVars+ NilChk-  *>
  24. <*$ RangeChk- StackChk- TypeChk-  OvflChk- *>
  25.  
  26. MODULE [2] Misc;
  27.  
  28. IMPORT e := Exec;
  29.  
  30.  
  31. (*
  32. **      $VER: misc.h 36.13 (6.5.90)
  33. **
  34. **      Unit number definitions for "misc.resource"
  35. *)
  36.  
  37. CONST
  38.  
  39. (*
  40.  * Unit number definitions.  Ownership of a resource grants low-level
  41.  * bit access to the hardware registers.  You are still obligated to follow
  42.  * the rules for shared access of the interrupt system (see
  43.  * exec.library/SetIntVector or cia.resource as appropriate).
  44.  *)
  45.   serialPort   * = 0; (* Amiga custom chip serial port registers
  46.                          (SERDAT,SERDATR,SERPER,ADKCON, and interrupts) *)
  47.   serialBits   * = 1; (* Serial control bits (DTR,CTS, etc.) *)
  48.   parallelPort * = 2; (* The 8 bit parallel data port
  49.                          (CIAAPRA & CIAADDRA only!) *)
  50.   parallelBits * = 3; (* All other parallel bits & interrupts
  51.                          (BUSY,ACK,etc.) *)
  52.  
  53.   miscName * = "misc.resource";
  54.  
  55.  
  56. (*-- Resource Base variable --------------------------------------------*)
  57.  
  58. VAR
  59.  
  60.   base * : e.APTR;
  61.  
  62.  
  63. (*-- Resource Functions ------------------------------------------------*)
  64.  
  65. (*
  66. **      $VER: misc_protos.h 36.2 (7.11.90)
  67. *)
  68.  
  69. PROCEDURE AllocMiscResource* [base,-6]
  70.   ( unitNum [0] : e.ULONG;
  71.     name    [9] : ARRAY OF CHAR )
  72.   : e.APTR;
  73. PROCEDURE FreeMiscResource* [base,-12]
  74.   ( unitNum [0] : e.ULONG );
  75.  
  76. BEGIN base := NIL
  77. END Misc.
  78.