flat assembler
Message board for the users of flat assembler.
Index
> Windows > [request]Example of simple Win 32 Driver with Buffered I/O |
Author |
|
Ivan_32 13 Mar 2010, 05:26
I've newer seen such example. Im trying to understand how drivers are working, but in C/C++ i've even have no idea what my compiler are doing with my code, so i just need to feel earth under my foot.
I need somthing like this but in assembly. http://pastebin.org/111514 btw: i also need an includes pack, can someone tell what to use? |
|||
13 Mar 2010, 05:26 |
|
revolution 13 Mar 2010, 05:30
There are a large number of examples of drivers already on this board. Have you tried searching for them yet?
|
|||
13 Mar 2010, 05:30 |
|
Ivan_32 13 Mar 2010, 12:06
Yes i tryed, but i found just one topic about what i need:
http://board.flatassembler.net/topic.php?t=9041 Ive searched for IRP_MJ_READ btw: i didnt sayed this, but i need an driver with IO by IRP_MJ_WRITE and IRP_MJ_READ |
|||
13 Mar 2010, 12:06 |
|
revolution 13 Mar 2010, 12:11
The FAQ of this sub-forum has a section on drivers.
|
|||
13 Mar 2010, 12:11 |
|
Ivan_32 13 Mar 2010, 12:36
I know, but theres no any sign of that like example. It's like hello world in drivers - so i guess i wont be diffcult to write this example, if its not too difficult, maybe you can write it ? I already know how it's basicaly works but i cant write it on FASM so i just need a bit of help with this. I'm not a lazy student or someone like these i just need a bit of help to start studing.
I just need to see code of FASM version of this source: http://pastebin.org/111514 It so difficult to get some info on english forums... in russian(atleast i do that like) if someone request example - we write it and sometimes even explain all of its aspects of work. And TS usualy wont be asking it again - this method are very effective i guess. |
|||
13 Mar 2010, 12:36 |
|
Ivan_32 14 Mar 2010, 13:52
Best way for me is to just see working code. When i was trying to learn how its works on C++ - i havent understand nothing until i saw working code(now i've understand how it works but i have some serious problems with offsets and byte-order so i decided to try it on assebmly. I have some little expirience in osdev, actualy i stoped in protected mode with working keyboard, so i think i would be able to understand this). Also i need some includes for kernel mode. Heard that the call's are diffrent than in user-mode, so i guess i also need an valid includes-pack(maybe only with it - i'll be able to rewrite code above in assembly but im no sure about this, actualy im not sure would it be working properly)
PS: Sorry for my english, i have an very little expirience off talking, 99% of time when i use it - i read docs and mans |
|||
14 Mar 2010, 13:52 |
|
baldr 14 Mar 2010, 14:32
Ivan_32,
Most C compilers are able to output mixed C/assembly listing. In it each C source line is followed by corresponding assembly language instructions. Device drivers' development requires something like DDK, WDK or KMDKit. Separate machine/VM for debugging is also a must (unless you enjoy BSODs on development machine). But first of all you'll need good understanding of kernel mode and KM driver architecture. MSDN is invaluable, there are several good books freely available ("Inside MS Windows 2000", "Undocumented Windows 2000 Secrets" – they're old, but still relevant). Show some effort, translate short function (DefaultHandler(), for example) to FASM. "I request you to do it" posture won't get you far. |
|||
14 Mar 2010, 14:32 |
|
a115433 14 Mar 2010, 14:36
i request MmProbeAndLockPages() in asm. The exception handling to be exact.
|
|||
14 Mar 2010, 14:36 |
|
Ivan_32 14 Mar 2010, 18:23
I feel that it would be simpier to just show with what i have problem...
Driver: http://pastebin.org/112701 Control Program: http://pastebin.org/112703 Togethere it just crashed into BSOD. This was supposed to be something like my Hello world in drivers but it just crashes and i realy dont understand why... |
|||
14 Mar 2010, 18:23 |
|
baldr 14 Mar 2010, 19:40
Ivan_32,
Use crash dump to find source of the fault. Also note that BSOD often contains relevant information about how and where the fault occurs. |
|||
14 Mar 2010, 19:40 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.