[comp.os.msdos.programmer] changing cpu speed through software

adnan@screech.rice.edu (Sarmad Adnan) (11/03/90)

I need to write a piece of code that would allow me to 
change the speed of the cpu (in a dual speed AT, with
AMI bios) through software. 
Some of the compaq have a 'MODE speed' command implimented
in the dos does something similar exist or can be written
for a computer with AMI bios ?.




--

                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                  Sarmad Adnan (adnan@rice.edu)
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

briggs@tamunix (Mark Lowe) (11/03/90)

In article <1990Nov3.014940.9232@rice.edu> adnan@screech.rice.edu (Sarmad Adnan) writes:
>
>I need to write a piece of code that would allow me to 
>change the speed of the cpu (in a dual speed AT, with
>AMI bios) through software. 
>Some of the compaq have a 'MODE speed' command implimented
>in the dos does something similar exist or can be written
>for a computer with AMI bios ?.
>                  Sarmad Adnan (adnan@rice.edu)

I once wrote a short machine language routine for a former roommate's
computer that had two speeds.  He has one of those computers that allows you
to toggle between speeds by hitting CTRL-ALT-HYPHEN or some such keystroke.
I messed around with the system enough to figure out that an unused bit in
I/O port 60 or 61 controlled the speed.  Make sure you disable interrupts
before toggling the bit, though, or you'll hang the machine.

I hope this vague description gives you some clues.

Mark C. Lowe - KB5III

rcollins@altos86.Altos.COM (Robert Collins) (11/09/90)

In article <9802@helios.TAMU.EDU> briggs@tamunix (Mark Lowe) writes:
>I messed around with the system enough to figure out that an unused bit in
>I/O port 60 or 61 controlled the speed.  Make sure you disable interrupts
>before toggling the bit, though, or you'll hang the machine.
>
>I hope this vague description gives you some clues.
>
By no means is CPU speed change consistent among machines.  Some use
an I/O port.  Some use the keyboard controller, some use memory
mapped I/O.  And you can almost guarantee, that writing to I/O port
61 in this guy's machine won't do it (unless it is the same motherboard
as the abovementioned).

The bottom line?  CPU Speed change is hardware/motherboard dependant.



-- 
"Worship the Lord your God, and serve him only."  Mat. 4:10
Robert Collins                 UUCP:  ...!sun!altos86!rcollins
HOME:  (408) 225-8002
WORK:  (408) 432-6200 x4356