News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

StdOut ml and poasm

Started by shlomok, April 28, 2012, 01:28:45 PM

Previous topic - Next topic

shlomok

Hi,
I decided to move back to RadAsm, however the same code that compiles under Pelles C does not compile under RadASM.


...
filePathBuffer db MAX_PATH dup (?)
...

;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
;Get the current path
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
getCurrentPath PROC          
mov esi,  offset filePathBuffer
invoke GetCurrentDirectory, sizeof filePathBuffer, addr filePathBuffer
invoke  StdOut, addr esi ; this line is causing the error
ret
getCurrentPath endp


ml compiles with the following errors:

b.asm(206) : error A2033: invalid INVOKE argument : 1
b.asm(206) : error A2114: INVOKE argument type mismatch : argument : 1

And BTW, poasm, has no problem compiling and running both:

mov esi,  addr filePathBuffer


and

mov esi,  offset filePathBuffer


This must be something very simple  ....
And does anyone know of a plugin for RadASM that can format/beautify the code?

Thanks

S.

qWord

The ADDR operator requires a memory expression:
ADDR [esi]

Effectively you will get the same result by removing the ADDR operator
FPU in a trice: SmplMath
It's that simple!

shlomok

Quote from: qWord on April 28, 2012, 01:32:22 PM
The ADDR operator requires a memory expression:
ADDR [esi]

Effectively you will get the same result by removing the ADDR operator

Thanks issue resolved.