how do BIOS know if floppy driver and disk exist ?

Programming, for all ages and all languages.
Post Reply
User avatar
david
Member
Member
Posts: 93
Joined: Tue Aug 21, 2007 4:22 am
Location: Beijing.China
Contact:

how do BIOS know if floppy driver and disk exist ?

Post by david »

using int 13h ?

ah = 00h , judge floppy driver ?

ah = 01h,

ah = 02h , judge floppy disk ?
User avatar
david
Member
Member
Posts: 93
Joined: Tue Aug 21, 2007 4:22 am
Location: Beijing.China
Contact:

Re: how do BIOS know if floppy driver and disk exist ?

Post by david »

who can tell me ?

nobody knows ..

di it by myself ..
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

You do know that you waited one hour before bumping the thread?

You do realise that people have other things to do than answer your questions and attempt to understand your stinted English?.

I hope so...
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

Do you know the meaning of "to search"? There was a reason why your previous threads got STFWed.

Since they say you learn from repeating things:
STFW, STFW and STFW
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
david
Member
Member
Posts: 93
Joined: Tue Aug 21, 2007 4:22 am
Location: Beijing.China
Contact:

Post by david »

to everyone:

i searched the information on google and baidu before i apply this question ...

but no information is useful ...

so i have to ask you

because my english is not good, but i have no method... so i asked
Last edited by david on Tue Dec 04, 2007 7:44 pm, edited 1 time in total.
User avatar
david
Member
Member
Posts: 93
Joined: Tue Aug 21, 2007 4:22 am
Location: Beijing.China
Contact:

Post by david »

my computer don't have floppy driver,

i want to forge(伪造) a floppy driver and floppy disk .

system startup, BIOS use int 19h , i want to make int 19h to read floppy disk which i forge(伪造).

i want to hook int 13h achieve .

when system read floppy disk , i make it to read hard disk ... (hook int 13h, ah = 02h, dl = 00h) ..

do you understand ?

chinese language:

我的计算机没有软驱,我想伪造一个软驱和软盘。当BIOS调用int 19hå
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Post by piranha »

wtf?!
OK, I want to know: Who here can read Chinese?

-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
User avatar
david
Member
Member
Posts: 93
Joined: Tue Aug 21, 2007 4:22 am
Location: Beijing.China
Contact:

Post by david »

I know how to do ..

but thanks all the same
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

How To Ask Questions wrote:If you are trying to find out how to do something (as opposed to reporting a bug), begin by describing the goal. Only then describe the particular step towards it that you are blocked on.

Often, people who need technical help have a high-level goal in mind and get stuck on what they think is one particular path towards the goal. They come for help with the step, but don't realize that the path is wrong. It can take substantial effort to get past this.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

[quote="david"]my computer don't have floppy driver,

i want to forge(伪造) a floppy driver and floppy disk .

system startup, BIOS use int 19h , i want to make int 19h to read floppy disk which i forge(伪造).

i want to hook int 13h achieve .

when system read floppy disk , i make it to read hard disk ... (hook int 13h, ah = 02h, dl = 00h) ..

do you understand ?

chinese language:

我的计算机没有软驱,我想伪造一个软驱和软盘。当BIOS调用int 19hå
User avatar
JAAman
Member
Member
Posts: 879
Joined: Wed Oct 27, 2004 11:00 pm
Location: WA

Post by JAAman »

BIOS functions are stored in ROM (READ ONLY memory). You can't override them.
yes you can, but in this case, its not a good idea... and to use this for a boot device (as implied by your int19 reference), would require building hardware -- your better off just buying a floppy drive

1) the BIOS cannot detect Floppy disks, instead it relies on the user to tell it which drives you have (you obviously didnt build your own box, so this would have been done by the people you purchased your system from -- although its quite easy to change...)

2) there is only one way to change the operation of int19 -- that is to build a hardware device, with boot-time init code which remaps int19 to your own code, but this wouldnt be a good idea, and int19 doesnt do anything at all with the floppy drive (all it does is tell BIOS to check the next boot device)

3) to trap int13, you will need to load a program to handle the code, then write the address into the RMode IDT
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Post by Brendan »

Hi,
JAAman wrote:
BIOS functions are stored in ROM (READ ONLY memory). You can't override them.
yes you can, but in this case, its not a good idea... and to use this for a boot device (as implied by your int19 reference), would require building hardware -- your better off just buying a floppy drive
There may be another way... ;)

If the computer has CD-ROM and supports "El'Torito" then it should be possible to create a boot CD, where the BIOS pretends the CD is a floppy.

Of course I'd just use a virtual machine instead (Bochs, Qemu, etc), and then start collecting cheap/old computers (e.g. people are often happy to give away old 80486 machines for free).


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Post Reply