The MASM Forum Archive 2004 to 2012

Project Support Forums => IDE Development and Support => RadAsm Support Forum => Topic started by: Ghirai on February 16, 2006, 12:13:59 AM

Title: Option to produce SYS file
Post by: Ghirai on February 16, 2006, 12:13:59 AM
Hey,

Would it be possible to add another option in the project wizard to pruduce SYS files/and add the standard entrypoint code?

Thanks.
Title: Re: Option to produce SYS file
Post by: KetilO on February 16, 2006, 07:55:35 AM
Yes it probably would.
How do you assemble and link a sys file?
If you can post the command line parameters for ml and link then I can create a new project type in masm.ini.

KetilO
Title: Re: Option to produce SYS file
Post by: Mincho Georgiev on February 16, 2006, 01:10:51 PM
link /driver example.obj
Title: Re: Option to produce SYS file
Post by: Ghirai on February 16, 2006, 03:15:15 PM
You could add this basic code as a template:


.386
.model flat, stdcall
option casemap:none

include \masm32\include\w2k\ntstatus.inc
include \masm32\include\w2k\ntddk.inc

.code

DriverEntry proc pDriverObject:PDRIVER_OBJECT,pusRegistryPath:PUNICODE_STRING

    ;your code goes here
    ret

DriverEntry endp

end DriverEntry


And to compile/link:

ml /nologo /c /coff driver.asm
link /nologo /driver /base:0x10000 /align:32 /out:driver.sys /subsystem:native driver.obj

Title: Re: Option to produce SYS file
Post by: KetilO on February 16, 2006, 07:46:41 PM
Hi Ghirai

Here is the driver project.
Follow the steps described in HowTo.txt

KetilO

[attachment deleted by admin]
Title: Re: Option to produce SYS file
Post by: Ghirai on February 17, 2006, 02:18:43 PM
Great, thanks :U
Title: Re: Option to produce SYS file
Post by: Mark Jones on February 17, 2006, 04:34:53 PM
Hi, in Agner's file http://www.agner.org/assem/testp.zip there is a project called DriverSource.zip. In that is some good info on 32 and 64-bit driver creation, including a 64-bit ntoskrnl.lib. (Note you need a C compiler to assemble it.)
Title: Re: Option to produce SYS file
Post by: KetilO on February 19, 2006, 02:10:05 PM
Thanks Mark

I will have a look at it.

KetilO