flat assembler
Message board for the users of flat assembler.

Index > OS Construction > int 13 extended write hanging

Author
Thread Post new topic Reply to topic
Spinlock



Joined: 03 Mar 2008
Posts: 2
Spinlock 03 Mar 2008, 22:34
I'm trying to run extended write (int 13h, ah=48h) in my boot sector to a USB flash drive (which I booted off of, which is reporting as device 80h). I can correctly read the drive's metrics and see that it supports extensions (30h), but when I call the write function (lba 1) it just hangs indefinitely. I've run the code in qemu with the bootsector (plus some padding to write to) as a fake hd image and it's worked there. Any help would be appreciated.
Post 03 Mar 2008, 22:34
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4347
Location: Now
edfed 03 Mar 2008, 22:46
try to identify the drive.
before to read from a drive with lba, you must convert lba to chs and use int13h as if the drive was chs.
if extended don't works, try the old method.

it works on my pcs.
see on yours.
Post 03 Mar 2008, 22:46
View user's profile Send private message Visit poster's website Reply with quote
Spinlock



Joined: 03 Mar 2008
Posts: 2
Spinlock 03 Mar 2008, 22:58
I thought since I was just trying to write to the second sector lba=chs=1. Is this wrong?

Further, I need to write to the whole 4gb, so I believe I need the extensions. I guess I'll try the non-extended write when I get home to see if that stalls too, but it won't be enough if I can't write to the full 4gb Sad
Post 03 Mar 2008, 22:58
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4347
Location: Now
edfed 03 Mar 2008, 23:39
chs can access be up to 8G drives.
lba 0 = chs 0/0/1
Post 03 Mar 2008, 23:39
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.