flat assembler
Message board for the users of flat assembler.
Index
> Windows > Connect to USB device |
Author |
|
FrozenKnight 10 Aug 2007, 10:19
How would i connect to a USB device? i've tried Google and MSDN . i just cant find anything that explains it well enough for asm.
|
|||
10 Aug 2007, 10:19 |
|
f0dder 10 Aug 2007, 10:55
What exactly do you mean by "connect to USB device"?
If you mean coding a driver, well, grab a copy of the USB specification and start sweating |
|||
10 Aug 2007, 10:55 |
|
FrozenKnight 11 Aug 2007, 09:53
the driver is already in the computer i just want to know how to identify if the device i want is connected and how to communicate with it.
|
|||
11 Aug 2007, 09:53 |
|
f0dder 12 Aug 2007, 20:40
That will depend entirely on the kind of device... could you be a bit more specific?
|
|||
12 Aug 2007, 20:40 |
|
Madis731 13 Aug 2007, 11:26
I don't remember where I saw it, but some article enumerated USB-devices easily - I'll try to find them. I can't find the right one, but I remember it was a good one I've studied it some myself because of MenuetOS, but not that much under Windows.
EDIT: Saw something here: http://board.flatassembler.net/topic.php?t=4915 Under Windows: http://www.codeproject.com/system/EnumDeviceProperties.asp Better if you use ASM: http://www.masm32.com/board/index.php?topic=2083.new Maybe MSDN can help you: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=717715&SiteID=1 I don't know if there's source code for the http://support.microsoft.com/kb/838100 but this can help also. Some chit-chat http://www.lvr.com/usbcenum.htm |
|||
13 Aug 2007, 11:26 |
|
TheRaven 25 Apr 2008, 01:59
In a generic approach you would have to create a process that hooks your USB driver process not the device driver specifically.
When the device is connected the USB driver is instantiated and this is when your process can access your system's registered device list and search for the desired device. This is the best way to handle this problem as it will be far more memory friendly across the boards. NOTE: There are freeware and open source utilities that minimize to the system tray and monitor for USB thumb drives in this fashion. Get one and if possible dis-assemble it into assembly and translate. There are other tools that dis-assemble into hex as well. It is all a matter of taste. Sidebar: This might seem a bit rediculous, but you must be aware that when you create systems and especially systems that deal with services that you compensate for lag in the services and systems that you wish to interact with. Programs in assembly are much faster than many other HLL programs for allot of reasons and thus may shoot ahead before the system and/or service is actually available for access. This type of error would be classified as a logical error and is among the hardest to debug. _________________ Nothing so sought and avoided more than the truth. I'm not insane, I know the voices in my head aren't real! |
|||
25 Apr 2008, 01:59 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.