BIOS Floppy Access

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
CROM
Posts: 6
Joined: Wed Jan 27, 2010 1:57 am

Re: BIOS Floppy Access

Post by CROM »

Gigasoft wrote:That's because first of all, you're not invoking int 13h, and you're also overwriting AX.
Sorry, that was just a typographical error in my post. I actually was invoking INT 13h, I just hadn't copy/pasted the code properly.
As for overwriting AX, that was my intention. I wanted it to contain a value of 0.
Gigasoft wrote: read_floppy:
mov ax, 0x201
mov cx,1
xor dx,dx
mov bx, 0x7E00 ; bx is 7E00, the place I want the data buffer to be
push byte 0
pop es
int 0x13
jc reset_floppy
Finally, something that works. Thanks a lot for the help. I do have a question though. What does moving 0x201 to AX accomplish? I don't see it used again after that, and the documentation for int 13h that I've seen hasn't mentioned AX either. Actually, this doesn't use any of the registers that int 13h requires to read from floppy, from what I was reading. Doesn't AH have to have 0x02 in it? This seems like another form of int 13h that I haven't come by.

//Edit: I just found out that AL and AH are the high and low bytes of AX. I had spent many, many hours of development under the assumption that AX was a completely separate register. Because of that, I figured zeroing AX would be fine, not knowing it would also zero AL and AH, thus throwing off everything. I will leave the above post intact, as a monument to those wasted hours.
Post Reply