doubt on int 10(0e) & reading sector

Programming, for all ages and all languages.
Post Reply
wenn32
Posts: 17
Joined: Sun Oct 24, 2010 2:30 am

doubt on int 10(0e) & reading sector

Post 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!
Tosi
Member
Member
Posts: 255
Joined: Tue Jun 15, 2010 9:27 am
Location: Flyover State, United States
Contact:

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

Post 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.
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

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

Post 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.
Post Reply