Please use
`include macamd64.inc`
at the beginning of the file, and, later one,
read about LEAF_ENTRY function, and NESTED_ENTRY functions,
and about the exception unwind model of AMD64.
Once you are familiar with the expectations of the OS runtime environment
with regard of your code, you migh be able to write ASM code for AMD64.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"maddin123" <> wrote in message
news

F7BAA76-814C-4AEE-998F-...
> Hi,
> trying to add asm-file with functions to my driver gives an error whenever
> my asm-functions have arguments. When not ml64 gives no error.
>
> ALIGN 16
> Foo PROC x
WORD, y
WORD
>
> MOV AX, 1
> RET
>
> Foo ENDP
>
> ERROR: error A2070: invalid instruction operands
>
> Foo PROC
>
> MOV AX, 1
> RET
>
> Foo ENDP
>
> NO ERROR!
>
> Bye
> Martin
>
> Shall i use stack pointer instead? Or must i tell ml64 something that it
> accepts arguments? Or not allowed in drivers?
>
> Thx
> Martin
>
>
> --
> Everyone is a newbie to something the first time.