B&B Electronics PCRTC manual LastPowerDownRTC

Page 11

Last_Power_Down_RTC

Purpose: Returns date and time of last power down within a structure.

C:struct TimeSave_T { unsigned int month; unsigned int day; unsigned int hour;

unsigned int minute; unsigned int second;

};

int Last_Power_Down_RTC(TimeSave_T far *ts);

Pascal: TYPE TimeSave_T = RECORD month: WORD;

day: WORD;

hour: WORD;

minute: WORD;

second: WORD; END;

TYPE TimeSave_Ptr = ^TimeSave_T;

FUNCTION Last_Power_Down_RTC(timeSave:

TimeSave_Ptr): WORD;

BASIC: TYPE TimeSaveT month AS INTEGER day AS INTEGER hour AS INTEGER minute AS INTEGER second AS INTEGER

END TYPE

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

Remarks: Last_Power_Down requires a far pointer to the TimeSave_T structure to be past as the argument.

Returns: The TimeSave_T structure with the appropriate values.

Example: See below.

Documentation Number PCRTC2095 Manual

9

B&B Electronics -- PO Box 1040 -- Ottawa, IL 61350

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

Image 11
Contents Internet Electronics Mfg. Co. IncDesigned and Manufactured Ottawa, Illinois Table of Contents Packing List SpecificationsGeneral Information IntroductionHardware Setup SetupSoftware Setup Hardware InstallationOverview Using the Device DriverOperation Setting the Pcrtc Time and Date Command Line OptionsProgramming with the Pcrtc Replacing the batteryStartRTCAPI BatteryRTCWord GetRTCTimeLastPowerDownRTC Pascal Programming Example QuickBASIC ExampleProgramming Example PPM Terminology Calculating ErrorOscillator Error Aging Map of XT Class Machines Appendix A. Hardware I/O MapHardware I/O Map of AT Class Machines