Home 

Floppy - Some DEBUG commands and programs


NOTE:  The Cassette BASIC version of this web page is at here.


----------------------------------------------------------------------------------
CRUDE REGISTER
----------------------------------------------------------------------------------

Here, we will read the floppy controller's main status register.  You do not need to have a floppy in the drive to do this.

Run DEBUG.  DEBUG will present a dash prompt.

At the dash prompt, type in the following, then press [Enter]:
i 3f4

DEBUG will perform an input from I/O port 3F4 (3F4 hex), then display the result, a byte.

As expected, the IBM 5.25" Diskette Drive Adapter in my IBM 5160 returns 80 (hex).   (whether or not a drive is connected that controller)

( In JUN19, I did this on two of my IBM 5150's and saw 10 !!!!
   Then I discovered that if I powered up the 5150's with its floppy drive disconnected from the controller, then I saw 80 [hex]. )


Technical: 80h = 10000000 = Controller ready, controller in DMA mode, ...
See the the 'Main Status Register' section of here.


----------------------------------------------------------------------------------
TURN ON DRIVE's LED AND SPINDLE MOTOR
----------------------------------------------------------------------------------

You do not need to have a floppy in the drive to do this.

Run DEBUG.  DEBUG will present a dash prompt.

For A: drive, at the dash prompt, type in the following, then press [Enter]:
o 3f2 14

For B: drive, at the dash prompt, type in the following, then press [Enter]:
o 3f2 25


With the IBM PC family, the LED and motor will only turn on for only a few seconds (because of a timeout in the motherboard BIOS).  If you want it to happen continuously, see here.


Technical: This is sending a command to the Digital Output Register (DOR) of the primary floppy controller.
14h = 00010100 = {Motor A, DMA disabled, no reset, drive 0}
25h = 00100101 = {Motor B, DMA disabled, no reset, drive 1}
See the the 'Digital Output Register' section of here.