1 Replies - 2237 Views - Last Post: 14 July 2012 - 08:50 AM

#1 hamzahq  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 14-July 12

Accessing usb port using assembly program

Posted 14 July 2012 - 03:20 AM

Can i use assembly language to access the usb port of my laptop so that i can connect any external hardware to my usb port and use it. ????
For example... controlling the fan intensity of an electric bulb using my laptop or connecting the remote control of a toy car and move the car using my keyboard....
Is This A Good Question/Topic? 0
  • +

Replies To: Accessing usb port using assembly program

#2 GunnerInc  Icon User is offline

  • "Hurry up and wait"
  • member icon




Reputation: 858
  • View blog
  • Posts: 2,277
  • Joined: 28-March 11

Re: Accessing usb port using assembly program

Posted 14 July 2012 - 08:50 AM

*** Moved to Assembly ***

What OS? What kind of remote? How is the light bulb connected? You have to talk to the hardware and you need to know how the hardware "speaks".

Can you do this in a High Level Language? Then you can do it in Assembly. Not sure what you think you will gain. You cannot directly access ports from User Mode programs (RING 3). You would have to write a driver to have direct access to ports (RING 0, RING 2). This is not something a new user to Assembly should attempt as their first project. The OS (I will guess you are using Windows) already has input/output API calls that you would use to access USB ports.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1