Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CLOCK$

136 views
Skip to first unread message

Thomas Whaples

unread,
Feb 27, 1999, 3:00:00 AM2/27/99
to
What is the purpouse of the DOS device CLOCK$ ? Can you do anything with
it?

Marcus Houlden

unread,
Feb 28, 1999, 3:00:00 AM2/28/99
to
Thomas Whaples wrote:
>
> What is the purpouse of the DOS device CLOCK$ ? Can you do anything with
> it?

AFAIK it's the system timer, and no, you can't do anything with it.
Rather like the device SMARTAAR that some old versions of SmartDrive and
NortonCache used to install.
--
Marcus Houlden ICQ: 29654055
http://www.deathsdoor.com/flimflam PGP Key ID: 0x1A1C2EA3
Fingerprint: A784 D8E5 D7AC 012F 602A 2685 F6C9 D602 1A1C 2EA3
All replies to flim...@usa.net will be automatically deleted.

ras...@highfiber.com

unread,
Feb 28, 1999, 3:00:00 AM2/28/99
to
In article <36D89886...@thor.prohosting.com>,
Thomas Whaples <pro...@thor.prohosting.com> asked:

> What is the purpouse of the DOS device CLOCK$ ? Can you do anything with
> it?

Here's the documentation from an IBM DOS manual:

>A popular add on feature is a "Real Time Clock" board. To allow these
>boards to be integrated into the system for TIME and DATE, there is a
>special device (determined by the attribute word) which is the CLOCK$
>device. In all respects, this device defines and performs functions like
>any other character device (most functions will be set done bit, reset
>error bit, return). When a read or write to this device occurs, exactly 6
>bytes are transferred. The first two bytes are a word which is the count
>of days since 1-1-80. The third byte is minutes, the fourth hours, the
>fifth 1/100 seconds, and the sixth seconds. Reading the CLOCK$ device
>gets the date and time, writing to it sets the date and time.

Love that reference to the TOD clock as an optional, cost-extra add-on!
As you've probably guessed, this is an old manual; DOS 2 to be exact.

Under more modern versions of DOS, the standard date-and-time functions
will automatically use the CMOS clock if present. Since they use a
more intuitive format than CLOCK$ (days since 1-1-80?) it's usually
easier to use these instead of CLOCK$ :

21/2A Get date .CX year, .DH month, .DL day, .AL day of the week
21/2B Set date .CX year, .DH month, .DL day
21/2C Get time .CH hour, .CL minute, .DH seconds, .DL hundredths
21/2D Set time .CH hour, .CL minute, .DH seconds, .DL hundredths

ras...@highfiber.com

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

Robert Riebisch

unread,
Mar 1, 1999, 3:00:00 AM3/1/99
to
Hi,

you can make your computer hang with:

CTTY CLOCK$

;-)
Bye,
Robert Riebisch

Thomas Whaples schrieb:

S.NAPper

unread,
Mar 3, 1999, 3:00:00 AM3/3/99
to
In article <36DA5EA6...@bercom-berlin.de>
Robert Riebisch <ber...@bercom-berlin.de> writes:

>Thomas Whaples schrieb:
>
>> What is the purpouse of the DOS device CLOCK$ ? Can you do anything
>> with it?
>

>You can make your computer hang with:


>
>CTTY CLOCK$
>
>;-)
>Bye,
>Robert Riebisch

I'm not quite sure how useful this information is, apart from...

DON'T DO IT.

S.NAPper

-- -
Stuff the B's - Show Me the Honey !


0 new messages