Article View: comp.os.msdos.programmer
Article #678Re: Warm boot? (All suggestions so far have been dangerous!)
From: Raymond Chen
Date: Sat, 11 Apr 1992 21:16
Date: Sat, 11 Apr 1992 21:16
39 lines
2237 bytes
2237 bytes
After my article on the dangers of auto-reboot to disk caches, I received the following piece of email, reposted with permission: From georgef@microsoft.com (George Forsman) Below is an acceptable version of a rebooter. It makes a call to the very useful, but very underused INT 15h, function 4fh. This particular call is trapped by a number (but I'm sure not all) disk caches or anyone else who wants to clean up on reboot. INT 15h, function 4Fh is a callout used by the INT 9 handler to let someone else play with the scan code that it just grabbed from the keyboard controller. By poking in the CTRL+ALT shift flags, and then issuing the INT 15h, you effectively simulate what the INT 9 handler would be doing when you actually press the physical keys. SMARTDRV v4.0 that is shipping with Windows 3.1 is a write-behind cache, and it commits when the following code is run. I have no idea if hyperdisk, &c do the same. 0100 MOV AX,0040 0103 MOV DS,AX 0105 MOV WORD PTR [0072],1234 010B OR WORD PTR [0017],000C 0111 MOV AX,4F53 0114 INT 15 0116 JMP F000:FFF0 If you wish to post this to the net, please do. I just don't feel like arguing with vi tonight... -- End of quoted message -- It's probably also a good idea to send out int 21/0d (disk reset) on each disk drive as well as performing an INT 13 sector 0 read on each hard drive. Cache programs will probably listen to at least one of these two operations and flush. The Interrupt List also lists an int 2f/fe03 that Norton's NCACHE listens to.
Technical Details
Message-ID:
<1992Apr11.211618.22597@Princeton.EDU>Path:
arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!mips!darwin.sura.net!jvnc.net!princeton!onion.princeton.edu!rjcReferences:
<1992Mar30.171014.3133@exu.ericsson.se> <roelof.8@parst1.UUCP> <1992Apr11.111109.1399@ugle.unit.no>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!mips!darwin.sura.net!jvnc.net!princeton!onion.princeton.edu!rjc From: rjc@onion.princeton.edu (Raymond Chen) Newsgroups: comp.os.msdos.programmer Subject: Re: Warm boot? (All suggestions so far have been dangerous!) Message-ID: <1992Apr11.211618.22597@Princeton.EDU> Date: 11 Apr 92 21:16:18 GMT Article-I.D.: Princeto.1992Apr11.211618.22597 References: <1992Mar30.171014.3133@exu.ericsson.se> <roelof.8@parst1.UUCP> <1992Apr11.111109.1399@ugle.unit.no> Sender: news@Princeton.EDU (USENET News System) Organization: Princeton University Lines: 39 Nntp-Posting-Host: onion.princeton.edu