Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for floppy.bat

(view source code of floppy.bat as plain text)

  1. @GOTO Run
  2. o 70 10
  3. i 71
  4. q
  5.  
  6. :Run
  7. @ECHO OFF
  8. IF NOT "%OS%"=="Windows_NT" GOTO Syntax
  9. IF NOT "%~1"=="" GOTO Syntax
  10. SETLOCAL ENABLEDELAYEDEXPANSION
  11. SET Drv.0=None
  12. SET Drv.1=360K
  13. SET Drv.2=1.2M
  14. SET Drv.3=720K
  15. SET Drv.4=1.44M
  16. FOR /F %%A IN ('DEBUG ^< %~sf0 ^| FIND /V "-"') DO SET Drv=%%A
  17. FOR %%A IN (0 1) DO CALL ECHO Floppy Drive %%A: %%Drv.!Drv:~%%A,1!%%
  18. ENDLOCAL
  19. GOTO:EOF
  20.  
  21. :Syntax
  22. ECHO.
  23. ECHO Floppy.bat,  Version 1.01 for Windows NT 4 and later
  24. ECHO Display the floppy drives configuration for the local computer
  25. ECHO.
  26. ECHO Usage:  FLOPPY.BAT
  27. ECHO.
  28. ECHO This batch file uses DEBUG to read the floppy disk configuration from the CMOS.
  29. ECHO More information can be found in PLASMA Online's CMOS Register Reference:
  30. ECHO http://www.plasma-online.de/textual/download/misc/cmos_registers.html
  31. ECHO and in The Starman's DEBUG Tutorial:
  32. ECHO http://mirror.href.com/thestarman/asm/debug/debug2.htm
  33. ECHO.
  34. ECHO Written by Rob van der Woude
  35. ECHO http://www.robvanderwoude.com
  36.  

page last modified: 2024-04-16; loaded in 0.0088 seconds