home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 18
/
aminetcdnumber181997.iso
/
Aminet
/
dev
/
m2
/
CycloneModules.lha
/
modules
/
txt
/
Misc.def
< prev
next >
Wrap
Text File
|
1996-08-01
|
1KB
|
48 lines
(*
** Cyclone Modula-2 Interface module:
** $VER: misc.h 36.13 (6.5.90)
** Includes Release 40.15
**
** Unit number definitions for "misc.resource"
**
** (C) Copyright 1985-1993 Commodore-Amiga, Inc.
** All Rights Reserved
**
** Interface module by Marcel Timmermans
** (C) Copyright 1995-1996 Marcel Timmermans
** All Rights Reserved
*)
(*$ Implementation- *)
DEFINITION MODULE Misc;
FROM SYSTEM IMPORT ADDRESS;
IMPORT Reg;
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.) *)
miscName = "misc.resource";
PROCEDURE AllocMiscResource(misc{Reg.A6}:ADDRESS;
unitNum{Reg.D0}:LONGINT;name{Reg.A1}:ADDRESS):ADDRESS; CODE -6;
PROCEDURE FreeMiscResource(misc{Reg.A6}:ADDRESS;unitNum{Reg.D0}:LONGINT); CODE -12;
END Misc.