How to programm floppy disk controller
Posted: Sun Sep 15, 2013 6:18 am
Hey,
I want to write/read floppy disks. I have 2 computers:
- notebook with usb floppy drive, like http://tiny.cc/rnbg3w
- standard "big" computer (dunno how to call it) with floppy drive like http://tiny.cc/bpbg3w
I have found out that writing to floppy disk in floppy drive is possible using BIOS interrupt (13h) for AH=03h
Ref to http://en.wikipedia.org/wiki/INT_13H#IN ... s_To_Drive i have written code to write my data from buffer to first floppy's sector (tasm):
Well it seems to be OK, but i don't know how to use it I haven't tested it either because I don't know how to.
My doubts:
I specify drive number by DL at above interrupt.
There is data table with such info http://en.wikipedia.org/wiki/INT_13H#Drive_Table
So... there is no problem with standard floppy drive ( http://tiny.cc/bpbg3w ).
But what if I use USB Floppy Drive ( http://tiny.cc/rnbg3w ) ? Hot to define it in that way ?
I want to write/read floppy disks. I have 2 computers:
- notebook with usb floppy drive, like http://tiny.cc/rnbg3w
- standard "big" computer (dunno how to call it) with floppy drive like http://tiny.cc/bpbg3w
I have found out that writing to floppy disk in floppy drive is possible using BIOS interrupt (13h) for AH=03h
Ref to http://en.wikipedia.org/wiki/INT_13H#IN ... s_To_Drive i have written code to write my data from buffer to first floppy's sector (tasm):
Code: Select all
bufor db 512 dup (0)
...
; filling bufor with my data i want to be placed at floppy disk
...
mov ax, ds
mov es, ax
mov bx, offset bufor
mov ah, 3h
mov al, 1
mov ch, 0
mov cl, 1
mov dh, 0
mov dl, 0 ; here i specify drive=0, how to detect my floppy drive ?
int 13h
My doubts:
I specify drive number by DL at above interrupt.
There is data table with such info http://en.wikipedia.org/wiki/INT_13H#Drive_Table
So... there is no problem with standard floppy drive ( http://tiny.cc/bpbg3w ).
But what if I use USB Floppy Drive ( http://tiny.cc/rnbg3w ) ? Hot to define it in that way ?