[comp.sys.ibm.pc] set system clock?

beaucham@uxh.cso.uiuc.edu (09/20/89)

This should be an easy one!  I have a standard, old 6 MHz IBM PC AT (believe
it or not, but it keeps going), and I am trying to reset the system clock.
The TIME command allows me to reset it for DOS (3.0) so as long as I leave
the machine on I'm o.k., but when I turn it off, it comes back up with the
same crummy incorrect time.  What's the trick to setting the actual hardware
system clock?  The DOS manual says consult your GTO.  What's a GTO?

I know I should have figured this out years ago.  I'm sure the answer is simple.
I just don't have it.  Thanks for your help.

	beaucham@uxc.cso.uiuc.edu

cpcahil@virtech.UUCP (Conor P. Cahill) (09/21/89)

In article <19500034@uxh.cso.uiuc.edu>, beaucham@uxh.cso.uiuc.edu writes:
> 
> This should be an easy one!  I have a standard, old 6 MHz IBM PC AT (believe
> it or not, but it keeps going), and I am trying to reset the system clock.

The system clock is normally set as part of the CMOS setup.  Earlier versions
of AT's and AT compatibles usually had some form of "SETUP" program.  This
is the same program you use to modify the display type, amount of memory,
disk types, etc.




-- 
+-----------------------------------------------------------------------+
| Conor P. Cahill     uunet!virtech!cpcahil      	703-430-9247	!
| Virtual Technologies Inc.,    P. O. Box 876,   Sterling, VA 22170     |
+-----------------------------------------------------------------------+

dold@mitisft.Convergent.COM (Clarence Dold) (09/21/89)

in article <19500034@uxh.cso.uiuc.edu>, beaucham@uxh.cso.uiuc.edu says:

> The TIME command allows me to reset it for DOS (3.0) so as long as I leave
> the machine on I'm o.k., but when I turn it off, it comes back up with the
> same crummy incorrect time.  What's the trick to setting the actual hardware
> system clock?  The DOS manual says consult your GTO.  What's a GTO?

Starting with DOS 3.3, INT21 AH=0x2E sets the time, and also adjusts the 
CMOS clock.  I would assume that TIME uses these INTs.
Aside from that, I have written a short program called udate 
that accepts a UNIX style command line to set the time and date,
using both the RTC calls and INT21, so it should work on earlier DOS.
I could mail it or post it (?).

A '68 GTO was a great machine, that had slightly more power than the 
original IBM PC.     I think it was built by Pontiac.  :-)  :-)
-- 
---
Clarence A Dold - dold@tsmiti.Convergent.COM		(408) 434-5293
		...pyramid!ctnews!tsmiti!dold
		P.O.Box 6685, San Jose, CA 95150-6685	MS#10-007

cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) (09/21/89)

In article <19500034@uxh.cso.uiuc.edu> beaucham@uxh.cso.uiuc.edu writes:
$This should be an easy one!  I have a standard, old 6 MHz IBM PC AT (believe
$it or not, but it keeps going), and I am trying to reset the system clock.
$The TIME command allows me to reset it for DOS (3.0) so as long as I leave
$the machine on I'm o.k., but when I turn it off, it comes back up with the
$same crummy incorrect time.  What's the trick to setting the actual hardware
$system clock?  The DOS manual says consult your GTO.  What's a GTO?

   It's a car, isn't it?  :-)

   But seriously, the DATE and TIME commands only affect DOS's clock, and
not the hardware clock available on ATs and higher (and as an add-in for
lower-end PCs).  At boot time, DOS sets its clock from the hardware clock;
from then on, however, DOS behaves as if the hardware clock didn't exist.

   Try looking through the disks that came with the AT; one of them should
include a program to allow you to set the system date and time (there should
be a disk that came with the AT rather than with DOS; that should be the one).

   Alternatively, "borrow" (ahem) a copy of one of the many setup programs
for ATs (e.g. Phoenix's SETUP that comes with ATs with a Phoenix BIOS) and
this will do the trick.

   (I must say I like BIOSes like Award and AMI which have the setup program
built-in, so you don't need to search through your 50 or 100 floppies for the
one with the setup program on it)

-- 
Stephen M. Dunn                         cs4g6ag@maccs.dcss.mcmaster.ca
**********************************************************************
       <std_disclaimer.h> = "\nI'm only an undergraduate!!!\n";
"VM is like an orgasm:  the less you have to fake, the better." - S.C.

Ralf.Brown@B.GP.CS.CMU.EDU (09/22/89)

In article <2518F946.23692@maccs.dcss.mcmaster.ca>, cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) wrote:
 >   But seriously, the DATE and TIME commands only affect DOS's clock, and
 >not the hardware clock available on ATs and higher (and as an add-in for
 >lower-end PCs).  At boot time, DOS sets its clock from the hardware clock;
 >from then on, however, DOS behaves as if the hardware clock didn't exist.

DOS 3.3 and up will set the hardware clock when setting the DOS clock.
--
UUCP: {ucbvax,harvard}!cs.cmu.edu!ralf -=-=-=-=- Voice: (412) 268-3053 (school)
ARPA: ralf@cs.cmu.edu  BIT: ralf%cs.cmu.edu@CMUCCVMA  FIDO: Ralf Brown 1:129/46
FAX: available on request                      Disclaimer? I claimed something?
"All through human history, tyrannies have tried to enforce obedience by
 prohibiting disrespect for the symbols of their power.  The swastika is
 only one example of many in recent history."
-- American Bar Association task force on flag burning

beaucham@uxh.cso.uiuc.edu (09/22/89)

Boy, did I get a lot of answers on that one -- most of them correct.
The moral is, if you want a lot of response, ask an easy question.
The correct answers are:

GTO  means          the IBM "Guide to Operations" manual
   (I hate acronyms; why couldn't IBM spell it out in the Disk Operating System
    manual?)

To reset the system clock, you can fork out the money for a clock card, run
some special software which you can download from a net somewhere, OR you can
simply yank out your old (seldom used) "Diagnostics for IBM Personal Computer
AT" diskette, boot up with it, and select option 4 -- SETUP.  This allows you
to reset the date and time, which unlike when you run under DOS, actually gets
saved in the hardware.  If I had DOS 3.3 or later (I have 3.0), I wouldn't
have had to run SETUP; the regular TIME command would have sufficed.

Now that I've saved the time, I note that I am losing 2 minutes per day.
Someone pointed out that my battery is probably running down and that it could
die soon.  So I've been forewarned.  When the battery dies, the machine forgets
about all of the setup settings and you have to buy and install a new battery
and run the diagnostics disk again.  The easiest thing to forget is the number 
(or numbers) of the hard disk(s) you have installed, so if you don't have them 
written down somewhere already, it is a good idea to run the setup procedure 
just to get those down before the battery dies on you.

Thanks for all of your suggestions!  BTW, here are two other stupid questions:
Where can you buy a replacement battery for a 6 MHz AT?  
What is involved in upgrading to the anther version of DOS -- e.g., DOS 4.0?
Do I need to reformat my disks (I have one 42 Mbyte Seagate which is running
under a Disk Manager driver and one regular 20 Mbyte DOS disk)?

		beaucham@uxc.cso.uiuc.edu

mlord@bmers58.UUCP (Mark Lord) (09/23/89)

In article <2518F946.23692@maccs.dcss.mcmaster.ca> cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) writes:
>In article <19500034@uxh.cso.uiuc.edu> beaucham@uxh.cso.uiuc.edu writes:
>$it or not, but it keeps going), and I am trying to reset the system clock.
>$The TIME command allows me to reset it for DOS (3.0) so as long as I leave
>$the machine on I'm o.k., but when I turn it off, it comes back up with the
>$same crummy incorrect time.  What's the trick to setting the actual hardware

>   But seriously, the DATE and TIME commands only affect DOS's clock, and
>not the hardware clock available on ATs and higher (and as an add-in for

Or use DOS 3.3 or higher, which actually *does* update the real CMOS clock
when setting the time/date with the DOS commands.

That's how I do it.  Works fine.

-Mark

waldman2@husc8.HARVARD.EDU (Bruce Waldman) (09/23/89)

There are several programs in the SIMTEL20 archives that will allow
you to fix clock and other CMOS attributes.  SETUP.ARC works really
well on my AT clone.

Bruce Waldman, bw@harvarda.bitnet
               waldman2@husc4.harvard.edu

cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) (09/24/89)

   You ask why IBM didn't spell out GTO in words ... that's the way IBM
works.  They use acronyms like crazy.  In fact, there is a database that
IBM employees use to keep track of acronyms (I'm serious!)

   As for upgrading to DOS 4:  Well, if you want to alter the partitioning
of the hard disk, you'll basically have to back the whole lot up (DO THIS WITH
THE NEW VERSION OF DOS, NOT THE OLD ONE!), reformat the hard disk, and restore
the stuff.  If you don't want to play with your partitioning, you can just
do the above process to the boot disk.  Make sure,though, that you don't
restore the old version of DOS on top of the new one!!!


-- 
Stephen M. Dunn                         cs4g6ag@maccs.dcss.mcmaster.ca
**********************************************************************
       <std_disclaimer.h> = "\nI'm only an undergraduate!!!\n";
"VM is like an orgasm:  the less you have to fake, the better." - S.C.

philips.electronics@canremote.uucp (PHILIPS ELECTRONICS) (09/26/89)

I have no experience with IBM AT's. However, the AT's I have used have a
program called SETUP. This allows you to change the date and time among 
other things. This info is stored in an area of CMOS RAM that is kept 
alive by a battery. 
 
Regards, Fred McGowan
---
 * Via ProDoor 3.1aR 

ho@fergvax.unl.edu (Tiny Bubbles...) (09/26/89)

From article <251a2f07@ralf>, by Ralf.Brown@B.GP.CS.CMU.EDU:
> DOS 3.3 and up will set the hardware clock when setting the DOS clock.

Is this only for those with AT's?  I have an XT clone with a clock card,
and not only does TIME not affect it, but I also have to run a TIMEDATE
program to get the right time loaded upon boot (during the AUTOEXEC).

Hmmm...  mus' be a strange card.
---
	... Michael Ho, University of Nebraska
Internet: ho@fergvax.unl.edu		USnail:  115 Nebraska Union
BITnet:   cosx001@UNLCDC3			 Lincoln, NE 68588-0461

Ralf.Brown@B.GP.CS.CMU.EDU (09/26/89)

In article <1838@unocss.UUCP>, ho@fergvax.unl.edu (Tiny Bubbles...) wrote:
 >From article <251a2f07@ralf>, by Ralf.Brown@B.GP.CS.CMU.EDU:
 >> DOS 3.3 and up will set the hardware clock when setting the DOS clock.
 >
 >Is this only for those with AT's?  I have an XT clone with a clock card,
 >and not only does TIME not affect it, but I also have to run a TIMEDATE

DOS 3.3 presumably* calls the CMOS-setting functions of INT 1Ah, so if
your BIOS doesn't support your clock (and XT clocks differ from
manufacturer to manufacturer), you're out of luck.

*I'm still running 3.1, so I can't be definitive until I get 3.3 in
several weeks.
--
UUCP: {ucbvax,harvard}!cs.cmu.edu!ralf -=-=-=-=- Voice: (412) 268-3053 (school)
ARPA: ralf@cs.cmu.edu  BIT: ralf%cs.cmu.edu@CMUCCVMA  FIDO: Ralf Brown 1:129/46
FAX: available on request                      Disclaimer? I claimed something?
"All through human history, tyrannies have tried to enforce obedience by
 prohibiting disrespect for the symbols of their power.  The swastika is
 only one example of many in recent history."
-- American Bar Association task force on flag burning

ray@philmtl.philips.ca (Raymond Dunn) (09/27/89)

In article <2518F946.23692@maccs.dcss.mcmaster.ca> cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) writes:
 >   But seriously, the DATE and TIME commands only affect DOS's clock, and
 >not the hardware clock available on ATs and higher (and as an add-in for
 >lower-end PCs).  At boot time, DOS sets its clock from the hardware clock;
 >from then on, however, DOS behaves as if the hardware clock didn't exist.

Just a little correction here.

MS DOS behaves in the same way in this area on both AT's and PC's.

What determines its behaviour is the functions implemented in the BIOS.

If BIOS interrupt 1A functions 2 and 4 are implemented, DOS sets its
internal time and date automatically at boot time.

From MS DOS 3.3 and up, the DATE and TIME commands *do* update the hardware
clock on the machine, so long as the BIOS implements interrupt 1A functions
3 & 5.

 >   (I must say I like BIOSes like Award and AMI which have the setup program
 >built-in, so you don't need to search through your 50 or 100 floppies for the
 >one with the setup program on it)

Hmm.  Floppies?  Ah yes, those things you use to install software onto your
hard disk, I remember.  (:-)

-- 
Ray Dunn.                    | UUCP: ray@philmt.philips.ca
Philips Electronics Ltd.     |       ..!{uunet|philapd|philabs}!philmtl!ray
600 Dr Frederik Philips Blvd | TEL : (514) 744-8200  Ext : 2347 (Phonemail)
St Laurent. Quebec.  H4M 2S9 | FAX : (514) 744-6455  TLX : 05-824090