Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I access the USB port through the BIOS in 16-bit x86 real mode?

I'm a newbie to the Assembly world,

I'm trying to write some assembly codes to communicate with Hardware devices like Serial, Parallel, VGA, Keyboard,..etc.

I'm doing this while being in Real Mode of the x86 intel processor, by booting my code from a boostrap I personally wrote to load my assembly code.

Well, according to my knowledge that I gathered from reading tutorials, the easiest way to me was to use BIOS INTs Service Routine (ISR) and on the other hand the LONGEST way is by accessing the different registers of the hardware, like for example: Status Register and Control Registers of the Serial Port....

Q1: Am I right about this?

I could communicate with the VGA and Serial hardwares using BIOS INTs, but I couldn't find any bios interrupts for the USB controller..?!

Q2: Can you help me in this to be able to communicate with the USB port and for other remaining ports, just make it general?

Q3:

like image 212
KhiloMilitant Khilo Avatar asked Dec 09 '22 04:12

KhiloMilitant Khilo


1 Answers

As Alex says, there is no universal BIOS-level support for USB. However, there have been some attempts at making real-mode DOS drivers for USB devices. I found a page with some source codes which you should be able to use: http://bretjohnson.us/source/source.htm

like image 84
Igor Skochinsky Avatar answered Jan 18 '23 22:01

Igor Skochinsky