flat assembler
Message board for the users of flat assembler.
Index
> Windows > Drivers for 98/2000 Goto page 1, 2, 3, 4, 5 Next |
Author |
|
defrag 11 Sep 2003, 08:30
Hello, again.
Now I have another question... is it possible to generate a VXD file or (or SYS for Win2000) using FASM? Exaples will be gratufully accepted |
|||
11 Sep 2003, 08:30 |
|
fasm9 11 Sep 2003, 10:14
there is vs.net and IDApro.
LE format is used in VxD drivers and DOS4GW executables. http://www.rosprombank.ru/~ig/le.zip more: http://www.rosprombank.ru/~ig/download.html http://www.datarescue.com/idabase/idadown.htm and more http://www.chsw.com/ddk/ http://www.microsoft.com/whdc/ddk/default.mspx -- i am just googling myself. Last edited by fasm9 on 17 Sep 2003, 14:18; edited 2 times in total |
|||
11 Sep 2003, 10:14 |
|
defrag 11 Sep 2003, 10:16
Thank you.
Now I understand what to do about VXD. But still, don't know how to compile SYS driver for Win2000. |
|||
11 Sep 2003, 10:16 |
|
comrade 14 Sep 2003, 04:25
Compile to COFF and link with MS link.exe (like one from masm32 package) as /driver /base:0x10000 /align:32 /subsystem:native
|
|||
14 Sep 2003, 04:25 |
|
comrade 14 Sep 2003, 04:37
I see fasm support format PE native, but I find no example .
Privalov? |
|||
14 Sep 2003, 04:37 |
|
scientica 14 Sep 2003, 09:05
comrade wrote: format PE native One simple question, but what is the native PE format? _________________ ... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself. - Bradley Kuhn |
|||
14 Sep 2003, 09:05 |
|
Tomasz Grysztar 14 Sep 2003, 09:11
Probably format PE native at 0x10000 with the fixups included would be enough.
|
|||
14 Sep 2003, 09:11 |
|
comrade 14 Sep 2003, 16:57
|
|||
14 Sep 2003, 16:57 |
|
Tomasz Grysztar 14 Sep 2003, 16:59
A good point. I should think about adding checksum generator to PE formatter.
|
|||
14 Sep 2003, 16:59 |
|
comrade 14 Sep 2003, 17:19
Have you read that link? Also, why does native compile to .exe, should it not be .sys?
|
|||
14 Sep 2003, 17:19 |
|
Tomasz Grysztar 14 Sep 2003, 17:38
I've never tried producing KMD with fasm, to get the right extension the small fix is enough in the fasmw's file name generator. But the checksum is a problem - Microsoft doesn't make the algorithm for calculating PE checksums publically available, the appropriate API from IMAGEHLP.DLL should be used for this purpose. But I can't use the Win32 API in fasm core, which is OS-independent, so probably the only solution would be to provide some external Win32-only tool for it.
|
|||
14 Sep 2003, 17:38 |
|
comrade 14 Sep 2003, 18:56
|
|||
14 Sep 2003, 18:56 |
|
Tomasz Grysztar 14 Sep 2003, 19:12
I've found that they have actually implemented it in WINE, with Google I've found their C routine for PE checksums here: http://www.winehq.org/hypermail/wine-patches/2000/11/0168.html
Now it would be easy to implement it in fasm, but - well, I don't know how did they get that algorithm (reverse engineering?), and I don't want to get fasm into any problems because of it in future. What's your opinion? |
|||
14 Sep 2003, 19:12 |
|
comrade 14 Sep 2003, 20:19
I think it will be fine. You live in Poland anyway.
|
|||
14 Sep 2003, 20:19 |
|
Tomasz Grysztar 14 Sep 2003, 20:37
I have updated the 1.49 release with the correct checksum calculation. This is, anyway, my own routine, which by accident gives the same result as the one from Windows. And it will generate PE files with correct checksums even on DOS or Linux or whatever else where fasm will be executed.
|
|||
14 Sep 2003, 20:37 |
|
comrade 14 Sep 2003, 23:03
Super!
|
|||
14 Sep 2003, 23:03 |
|
comrade 15 Sep 2003, 00:18
What about different alignment? Native drivers (.sys) need 32-byte alignment instead, I think?
|
|||
15 Sep 2003, 00:18 |
|
comrade 15 Sep 2003, 04:31
Ok I did, cool. Very nice source FASM, I was able to do very quickly.
|
|||
15 Sep 2003, 04:31 |
|
scientica 15 Sep 2003, 04:48
Privalov wrote: Now it would be easy to implement it in fasm, but - well, I don't know how did they get that algorithm (reverse engineering?), and I don't want to get fasm into any problems because of it in future. What's your opinion? I don't think M$ wants to stop WINE from developing (ie they're allowing M$ to use thier PE format on other platforms -- soon they might even try to sell their software to Linux users...) Perhaps you should ask the WINE dev team about this, they should know. _________________ ... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself. - Bradley Kuhn |
|||
15 Sep 2003, 04:48 |
|
Goto page 1, 2, 3, 4, 5 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.