home *** CD-ROM | disk | FTP | other *** search
- (**************************************************************************
-
- $RCSfile: Misc.mod $
- Description: Interface to misc.resource
-
- Created by: fjc (Frank Copeland)
- $Revision: 3.2 $
- $Author: fjc $
- $Date: 1994/08/08 00:50:39 $
-
- Includes Release 40.15
-
- (C) Copyright 1985-1993 Commodore-Amiga, Inc.
- All Rights Reserved
-
- Oberon-A interface Copyright © 1994, Frank Copeland.
- This file is part of the Oberon-A Interface.
- See Oberon-A.doc for conditions of use and distribution.
-
- ***************************************************************************)
-
- MODULE Misc;
-
- (*
- ** $C- CaseChk $I- IndexChk $L+ LongAdr $N- NilChk
- ** $P- PortableCode $R- RangeChk $S- StackChk $T- TypeChk
- ** $V- OvflChk $Z- ZeroVars
- *)
-
- IMPORT E := Exec;
-
-
- (*
- ** $VER: misc.h 36.13 (6.5.90)
- **
- ** Unit number definitions for "misc.resource"
- *)
-
- CONST
-
- (*
- * Unit number definitions. Ownership of a resource grants low-level
- * bit access to the hardware registers. You are still obligated to follow
- * the rules for shared access of the interrupt system (see
- * exec.library/SetIntVector or cia.resource as appropriate).
- *)
- serialPort * = 0; (* Amiga custom chip serial port registers
- (SERDAT,SERDATR,SERPER,ADKCON, and interrupts) *)
- serialBits * = 1; (* Serial control bits (DTR,CTS, etc.) *)
- parallelPort * = 2; (* The 8 bit parallel data port
- (CIAAPRA & CIAADDRA only!) *)
- parallelBits * = 3; (* All other parallel bits & interrupts
- (BUSY,ACK,etc.) *)
-
- name * = "misc.resource";
-
-
- (*-- Resource Base variable --------------------------------------------*)
-
- TYPE
-
- MiscBasePtr * = CPOINTER TO MiscBase;
- MiscBase * = RECORD (E.Node) END;
-
- VAR
-
- base * : MiscBasePtr;
-
-
- (*-- Resource Functions ------------------------------------------------*)
-
- (*
- ** $VER: misc_protos.h 36.2 (7.11.90)
- *)
-
- LIBCALL (base : MiscBasePtr) AllocMiscResource*
- ( unitNum [0] : E.ULONG;
- name [9] : ARRAY OF CHAR )
- : E.APTR;
- -6;
- LIBCALL (base : MiscBasePtr) FreeMiscResource*
- ( unitNum [0] : E.ULONG );
- -12;
-
-
- (*-- Resource Base variable --------------------------------------------*)
- (* $L- Address globals through A4 *)
-
-
- (*-----------------------------------*)
- PROCEDURE OpenResource * (mustOpen : BOOLEAN);
-
- BEGIN (* OpenResource *)
- IF base = NIL THEN
- base := E.base.OpenResource (name);
- IF mustOpen & (base = NIL) THEN HALT (100) END;
- END;
- END OpenResource;
-
-
- END Misc.
-