B&B Electronics PCRTC manual GetRTCTime, Word

Page 10

Get_RTC_Time

Purpose : Returns the RTC time within a structure.

C:struct GetTime_T { unsigned int hours; unsigned int min;

unsigned int seconds; unsigned int h_seconds;

};

int Get_RTC_Time(GetTime_T far *gt);

Pascal : TYPE GetTime_T = RECORD hours: WORD;

min: WORD;

seconds: WORD;

h_seconds: WORD; END;

TYPE GetTime_Ptr = ^GetTime_T;

FUNCTION Get_RTC_Time(time: GetTime_Ptr):

WORD;

BASIC: TYPE GetTimeT hours AS INTEGER min AS INTEGER seconds AS INTEGER hseconds AS INTEGER

END TYPE

FUNCTION GetRTCTime%(BYVAL Offs AS INTEGER, BYVAL Segm AS INTEGER)

Remarks: Get_RTC_Time requires a far pointer to the GetTime_T structure to be past as the argument.

Returns: The GetTime_T structure with the appropriate values.

Example: See below.

8

Documentation Number PCRTC2095 Manual

B&B Electronics --

PO Box 1040 -- Ottawa, IL 61350

PH (815) 433-5100 -- FAX (815) 433-5105

Image 10
Contents Designed and Manufactured Ottawa, Illinois Electronics Mfg. Co. IncInternet Table of Contents Introduction SpecificationsGeneral Information Packing ListSetup Hardware SetupHardware Installation Software SetupOperation Using the Device DriverOverview Command Line Options Setting the Pcrtc Time and DateReplacing the battery Programming with the PcrtcBatteryRTC StartRTCAPIGetRTCTime WordLastPowerDownRTC QuickBASIC Example Pascal Programming ExampleProgramming Example Oscillator Error Calculating ErrorPPM Terminology Aging Appendix A. Hardware I/O Map Map of XT Class MachinesHardware I/O Map of AT Class Machines