Page 1 of 1

doubt on int 10(0e) & reading sector

Posted: Sat Jan 08, 2011 7:11 am
by wenn32
hello guys i have few doubts from int 10 and reading sector from usb

i)int 10h
Code:
int 10
AH = 0E
AL = ASCII character to write
BH = page number (text modes)
BL = foreground pixel color (graphics modes)


As you can see what is page number(in BH register) and what do they exactly mean by graphics mode(BL) i mean should i set any register to make use of graphics mode

ii)Now i know how to read floppy using int 13h but how can i read USB sector while booting from USB

Thanks!

Re: doubt on int 10(0e) & reading sector

Posted: Sat Jan 08, 2011 9:12 am
by Tosi
(i) Page number is exactly what it says it is. In text mode, you can have multiple pages, and then swap them out of the screen. This allows you to say, write a warning screen, then display it over what is currently being displayed, and then return the original display by swapping pages.
In graphics mode, bl would set the foreground color of the text. Otherwise I'm guessing the BIOS would use the current attribute for colors in text modes.

(ii) I don't know this off the top of my head, look it up in Ralf Brown's Interrupt List. There might not be a BIOS function to read sectors from a USB drive, so you might want to look up some documentation on the hardware as well.

Re: doubt on int 10(0e) & reading sector

Posted: Wed Jan 12, 2011 10:17 pm
by Owen
The BIOS will emulate the USB Mass Storage Device as a hard drive (most likely; I doubt you're using a USB CDROM here), if the BIOS supports it, so just pretend its a normal drive.

Of course, this emulation does not carry through to higher levels. You must implement USB drivers to access a USB stick from your OS.