disable IDE write cache (Miscellaneous)
> You can always talk to the device directly.
Challenge accepted.
hwinfo16.exe reports whether the write cache is disabled or enabled.
https://www.hwinfo.com/files/HWINF623.ZIP
In a system with only one disk and no CD-ROM:
C:\>debug.com
-a 100
1674:0100 mov dx,1f1
1674:0103 mov al,82
1674:0105 out dx,al
1674:0106 mov dx,1f7
1674:0109 mov al,ef
1674:010B out dx,al
1674:010C in al,dx
1674:010D mov ah,4c
1674:010F int 21
1674:0111
-g =100
Program terminated normally (00C0)
-q
After running that, hwinfo16.exe reports that the write cache is disabled.
For a different IDE bus, the ports would need to be adjusted. To select a drive, the Drive / Head register would need to be set before issuing the Set Feature command, and then the status would need to be read 15 times to clear the status and delay 400 ns. It's so simple! (not)
Helpful links:
https://web.archive.org/web/20250820020434/https://wiki.osdev.org/ATA_PIO_Mode
https://en.wikibooks.org/wiki/First_steps_towards_system_programming_under_MS-DOS_7/Debugger%27s_assembler_commands
Complete thread:
- disable IDE write cache - bencollver, 23.02.2026, 05:50 (Miscellaneous)
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- disable IDE write cache - Japheth, 23.02.2026, 13:40
- disable IDE write cache - bencollver, 23.02.2026, 17:09
- disable IDE write cache - RayeR, 23.02.2026, 17:58
- disable IDE write cache - bencollver, 23.02.2026, 18:44
- disable IDE write cache - Japheth, 23.02.2026, 13:40
Mix view