flat assembler
Message board for the users of flat assembler.

Index > Windows > Drivers for 98/2000

Goto page 1, 2, 3, 4  Next
Author
Thread Post new topic Reply to topic
defrag



Joined: 10 Sep 2003
Posts: 4
defrag
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
Post 11 Sep 2003, 08:30
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7498
Location: Kraków, Poland
Tomasz Grysztar
As fasm doesn't support LE output, you'd have to make VxD files manually (in binary output mode) - since I was doing such thing with PE files, it shouldn't be really hard to do it with LE. I was even planning to make some example, but I'd have to read something more about LE first - about this particular format I know very little.

On the other hand, you can simply use MS COFF output and link it with Microsoft's DDK linker.
Post 11 Sep 2003, 08:34
View user's profile Send private message Visit poster's website Reply with quote
fasm9



Joined: 19 Jun 2003
Posts: 439
fasm9
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. Smile


Last edited by fasm9 on 17 Sep 2003, 14:18; edited 2 times in total
Post 11 Sep 2003, 10:14
View user's profile Send private message Reply with quote
defrag



Joined: 10 Sep 2003
Posts: 4
defrag
Thank you.
Now I understand what to do about VXD.
But still, don't know how to compile SYS driver for Win2000.
Post 11 Sep 2003, 10:16
View user's profile Send private message Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
Compile to COFF and link with MS link.exe (like one from masm32 package) as /driver /base:0x10000 /align:32 /subsystem:native

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 14 Sep 2003, 04:25
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
I see fasm support format PE native, but I find no example Sad.
Privalov?

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 14 Sep 2003, 04:37
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
scientica
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
Post 14 Sep 2003, 09:05
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7498
Location: Kraków, Poland
Tomasz Grysztar
Probably format PE native at 0x10000 with the fixups included would be enough.
Post 14 Sep 2003, 09:11
View user's profile Send private message Visit poster's website Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 14 Sep 2003, 16:57
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7498
Location: Kraków, Poland
Tomasz Grysztar
A good point. I should think about adding checksum generator to PE formatter.
Post 14 Sep 2003, 16:59
View user's profile Send private message Visit poster's website Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
Have you read that link? Also, why does native compile to .exe, should it not be .sys?

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 14 Sep 2003, 17:19
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7498
Location: Kraków, Poland
Tomasz Grysztar
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.
Post 14 Sep 2003, 17:38
View user's profile Send private message Visit poster's website Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
Sad

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 14 Sep 2003, 18:56
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7498
Location: Kraków, Poland
Tomasz Grysztar
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. Confused What's your opinion?
Post 14 Sep 2003, 19:12
View user's profile Send private message Visit poster's website Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
I think it will be fine. You live in Poland anyway.

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 14 Sep 2003, 20:19
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7498
Location: Kraków, Poland
Tomasz Grysztar
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. Wink And it will generate PE files with correct checksums even on DOS or Linux or whatever else where fasm will be executed.
Post 14 Sep 2003, 20:37
View user's profile Send private message Visit poster's website Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
Super!

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 14 Sep 2003, 23:03
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
What about different alignment? Native drivers (.sys) need 32-byte alignment instead, I think?

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 15 Sep 2003, 00:18
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
Ok I did, cool. Very nice source FASM, I was able to do very quickly.

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 15 Sep 2003, 04:31
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
scientica
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. Confused 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
Post 15 Sep 2003, 04:48
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2, 3, 4  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.