Date: Mon, 10 Apr 95 12:12 MDT From: mat AT ardi DOT com (Mat Hostetter) To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: RE: timers and smartdrive.exe References: <9504051112 DOT AA08398 AT sun DOT soe DOT clarkson DOT edu DOT soe> bdavidson AT ra DOT isisnet DOT com writes: >This rang a bell, so I went to my bookcase and dug out Dr. Dobb's >Journal, #184 (Jan. 1992), and there was an article called "Untangling >SMARTDrive" by Geoff Chappell (pp 64-72). Ralf Brown's enormous interrupt list describes this interface. Here is the appropriate excerpt. -Mat INT 21 - SMARTDRV.SYS - IOCTL - CACHE CONTROL AX = 4403h BX = handle for device "SMARTAAR" CX = number of bytes to write DS:DX -> SMARTDRV control block (see below) Return: CF clear if successful AX = number of bytes actually written = 0000h if control block too small for given command CF set on error AX = error code (01h,05h,06h,0Dh) (see AH=59h) SeeAlso: AX=4402h"SMARTDRV",INT 2F/AX=4A10h/BX=0000h Format of SMARTDRV control block: Offset Size Description 00h BYTE function code 00h flush cache 01h flush and discard cache 02h disable caching (flushes and discards cache first) 03h enable caching 04h control write caching 05h set flushing tick count 06h lock cache contents 07h unlock cache contents 08h set flush-on-reboot flag 09h unused 0Ah control full-track caching 0Bh reduce cache size 0Ch increase cache size 0Dh set INT 13 chain address ---function 04h--- 01h BYTE write caching control action 00h turn off write-through 01h turn on write-through 02h turn off write buffering (also flushes cache) 03h turn on write buffering (also flushes cache) ---function 05h--- 01h WORD number of timer ticks between cache flushes ---function 08h--- 01h BYTE new flush-on-reboot flag (00h off, 01h on) ---function 0Ah--- 01h BYTE full-track writes are 00h not cached 01h cached ---functions 0Bh,0Ch--- 01h WORD number of 16K pages by which to increase/reduce cache size ---function 0Dh--- 01h DWORD new address to which to chain on INT 13 Note: the previous address is not preserved