[comp.sys.ibm.pc.misc] Setting the Turbo mode by software

eepjm@cc.newcastle.edu.au (04/10/91)

My apologies to those who have seen this before - it looks as if I gave my
original posting too restricted a circulation, because the only replies I
got were from those who didn't know the answer.

Background: on many IBM-AT clones, one has a "turbo" mode or something similar
to select the processor clock rate.  On some such machines the switching is
obviously hard-wired since the only way to change the speed is with a
front-panel pushbutton.  On many others, however, the speed can be changed
via the keyboard (using Ctrl/Alt/+ or something similar), which implies that
the speed can be changed by software.

Question: how does one do this?  Presumably by writing something to a port,
but which port and what is the code?

(Yes, I know that the answer might be different for different clones, but
 if I can find out the answer for at least one clone, that gives me a
 starting point.  And you never know, a de facto standard might have arisen.)

While I have your attention, here's another tricky question to which I
would love to have the answer:

How does one tell MS-DOS that it's in-memory copies of a disk FAT and
directory are invalid - i.e. how can one force it to re-read the disk rather
than rely on its obsolete in-memory copy?  Re-booting the machine works
(but by then it's usually too late, another disk-full of vital files has
been corrupted), but I'd like to have a less drastic solution.

Peter Moylan                    eepjm@cc.newcastle.edu.au

cs352a41@cs.iastate.edu (Adam Goldberg) (04/10/91)

eepjm@cc.newcastle.edu.au writes:

>How does one tell MS-DOS that it's in-memory copies of a disk FAT and
>directory are invalid - i.e. how can one force it to re-read the disk rather
>than rely on its obsolete in-memory copy?  Re-booting the machine works
>(but by then it's usually too late, another disk-full of vital files has
>been corrupted), but I'd like to have a less drastic solution.

>Peter Moylan                    eepjm@cc.newcastle.edu.au

MS-DOS sends a message to the device driver for that paricular device, the
device driver is either able (through hardware, disk serial#, drive door open,
or some such device) tell if the disk has been changed.  The device driver 
either sends back "Yes, it has been changed", "No, it hasn't", or "Aw, heck,
how the h**l am I supposed to know?".

I know this isn't as complete as you'd like, Peter, but the hardware-stuff
seems like it would be pretty specific to the drive, dos, device driver, etc.

Adam
--
+-----------------------------------------------------------------------------+
! Adam Goldberg               ! "Working to make EMACS safe for mankind"      !
! cs352@zaphod.cs.iastate.edu ! "It's simple! Even a PASCAL programmer could  !
! tabu6@ccvax.iastate.edu     !     do it!"                                   !

mir@opera.chorus.fr (Adam Mirowski) (04/12/91)

In article <1991Apr10.104737.9962@cc.newcastle.edu.au>, eepjm@cc.newcastle.edu.au writes:

%% How does one tell MS-DOS that it's in-memory copies of a disk FAT and
%% directory are invalid - i.e. how can one force it to re-read the disk rather
%% than rely on its obsolete in-memory copy?  Re-booting the machine works
%% (but by then it's usually too late, another disk-full of vital files has
%% been corrupted), but I'd like to have a less drastic solution.

Just press Ctrl-C at DOS prompt! Try Ctrl-Break if it doesn't work.
-- 
Adam Mirowski,  mir@chorus.fr (FRANCE),  tel. +33 (1) 30-64-82-00 or 74
Chorus systemes, 6, av.Gustave Eiffel, 78182 Saint-Quentin-en-Yvelines CEDEX

** Sender Unknown ** (04/15/91)

eepjm@cc.newcastle.edu.au writes:

> How does one tell MS-DOS that it's in-memory copies of a disk FAT and
> directory are invalid - i.e. how can one force it to re-read the disk rather
> than rely on its obsolete in-memory copy?

This doesn't universally work across all OEM versions of DOS, but...  The
CP/M ritual of using a Control-C to force a re-read of the disk's vitals
can be found on some DOS versions.  It's not very helpful if you have even
a simple disk cache (other than BUFFERS=?? in config.sys) running.
The smart way to do it probably involves an ioctl call to the driver.
-- Bob


               Bob Izenberg
         cs.utexas.edu!dogface!bei   [ ]   "So young, so bad... So what!"
             512 346 7019                        Wendy O. Williams

chrisb@pro-permian.cts.com (Chris Bagwell) (04/22/91)

In-Reply-To: message from pwb@newt.phys.unsw.OZ.AU

Another point on the turbo button is that most clones that have the switch
to go into turbo mode will not actually change speeds until you reboot.  I
believe that the computers with the ctrl-alt-+ combo will go into that
speed auto.  
----
ProLine:  chrisb@pro-permian
Internet: chrisb@pro-permian.cts.com
UUCP:     crash!pro-permian!chrisb
ARPA:     crash!pro-permian!chrisb@nosc.mil