(*************************************************************************** $RCSfile: BattClock.mod $ Description: Interface to battclock.resource Created by: fjc (Frank Copeland) $Revision: 3.2 $ $Author: fjc $ $Date: 1994/08/08 00:50:27 $ $VER: battclock.h 36.4 (1.5.90) 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 BattClock; (* ** $C- CaseChk $I- IndexChk $L+ LongAdr $N- NilChk ** $P- PortableCode $R- RangeChk $S- StackChk $T- TypeChk ** $V- OvflChk $Z- ZeroVars *) IMPORT E := Exec; (* ** ** BattClock resource name strings. ** *) CONST name * = "battclock.resource"; (**-- Resource Base variable --------------------------------------------*) TYPE BattClockBasePtr = CPOINTER TO BattClockBase; BattClockBase = RECORD (E.Node) END; VAR base : BattClockBasePtr; (**-- Resource Functions ------------------------------------------------*) (* ** $VER: battclock_protos.h 1.3 (3.5.90) *) LIBCALL (base : BattClockBasePtr) ResetBattClock* (); -6; LIBCALL (base : BattClockBasePtr) ReadBattClock* () : E.ULONG; -12; LIBCALL (base : BattClockBasePtr) WriteBattClock* ( time [0] : E.ULONG ); -18; (**-- 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; (* IF *) END OpenResource; END BattClock.