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!" !
** 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
pwb@newt.phys.unsw.OZ.AU (Paul W. Brooks) (04/19/91)
In article <1991Apr10.104737.9962@cc.newcastle.edu.au>, eepjm@cc.newcastle.edu.au writes: > > 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.) > Well, according to the Hardware Manual for my NEC Powermate IV (a '286 AT clone) the speed selection is done with a CTRL-ALT-'+' combination as you describe. But internally, it sets a special bit in the Keyboard controller chip output, and is not accessable to the rest of the system The chip is an 8742 / 8042. What that does electrically to the motherboard is anyones guess. Best of Luck! through a 'normal' I/O port. Paul Brooks |Internet: pwb@newt.phys.unsw.edu.au Uni. of N.S.W. |If you have trouble sleeping, try lying on the end of Kensington NSW 2033| your bed. With a little luck you'll drop off. AUSTRALIA | - Mark Twain.