Option to produce SYS file

Started by Ghirai, February 16, 2006, 12:13:59 AM

Previous topic - Next topic

Ghirai

Hey,

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

Thanks.
MASM32 Project/RadASM mirror - http://ghirai.com/hutch/mmi.html

KetilO

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

Mincho Georgiev


Ghirai

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

MASM32 Project/RadASM mirror - http://ghirai.com/hutch/mmi.html

KetilO

Hi Ghirai

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

KetilO

[attachment deleted by admin]

Ghirai

MASM32 Project/RadASM mirror - http://ghirai.com/hutch/mmi.html

Mark Jones

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.)
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

KetilO

Thanks Mark

I will have a look at it.

KetilO