esspecially malone
when i try to compile quad console program i get this error

quad.asm(82) : error A2137: too few arguments to INVOKE
quad.asm(82) : error A2114: INVOKE argument type mismatch : argument : 1
quad.asm(85) : error A2137: too few arguments to INVOKE
quad.asm(85) : error A2114: INVOKE argument type mismatch : argument : 1
quad.asm(89) : error A2137: too few arguments to INVOKE
quad.asm(89) : error A2114: INVOKE argument type mismatch : argument : 1
quad.asm(92) : error A2137: too few arguments to INVOKE
quad.asm(92) : error A2114: INVOKE argument type mismatch : argument : 1
Posted on 2002-03-09 01:18:47 by k0d
Your first parameter is wrong. What API call or function is this. Maybe it wants an address like OFFSET var or just plain var.

invoke function, OFFSET var
or
invoke function, var

Ooops, I'm not malone :)
Posted on 2002-03-09 01:23:37 by stryker
Your also not right either :)

invoke takes ADDR :)

Sliver

---EDIT---
If I'm wrong about this... imagine how stupid I'll look
:) :) :)
Posted on 2002-03-09 01:24:26 by Sliver
here is the code
i am real beginner so
Posted on 2002-03-09 01:28:48 by k0d
I hate to say that it actually compiled for me :(

Sliver
Posted on 2002-03-09 01:33:28 by Sliver
ADDR are usually used for locals but can handle globals too, OFFSETS are for globals but can't handle locals. OFFSETS can handle forward reference of a memory address while ADDR can't.

So choose your flavor



.data
var dd 4
.code
invoke function, OFFSET var
;or
invoke function, ADDR var
;or
invoke function, var

function20 PROC
LOCAL var:DWORD

mov var, 4

invoke function, ADDR var
;or
invoke function, var
ret
function20 ENDP


Or maybe parameter 1 is missing.

:) Assembled perfectly on my machine.
Posted on 2002-03-09 01:33:35 by stryker
I just downloaded it, ran the batch file and it built with no errors or warnings and seems to run correctly.

--------------------
Roots of a Quadratic
--------------------

Enter coefficient a: 3
Enter coefficient b: 9
Enter coefficient c: 4

Roots are:

Root 1 : -2.457427 + 0j
Root 2 : -0.5425729 + 0j

Repeat? (y/n)

:)

Regards,

hutch@movsd.com
Posted on 2002-03-09 01:35:37 by hutch--
thx all
i think something wrong with my xp
Posted on 2002-03-09 05:37:44 by k0d
hmmm, i'm not sure what the problem is. The errors are for the FloatToStr function that's in the masm32 library package. It's defined in masm32.inc as:

FloatToStr proto stdcall fpin: QWORD, szDbl: PTR CHAR

I'd make sure that the variable 'roots' is defined as an array of QWORD, then check your masm32.inc file and make sure it's the same as above. When I get some time later this weekend i'll look it over again.

malone
Posted on 2002-03-09 12:31:43 by malone
guys actually i didn't had in my masm32.inc after replace
FloatToStr PROTO :DWORD,:DWORD,:DWORD
with this
FloatToStr proto stdcall fpin: QWORD, szDbl: PTR CHAR
i could get a .obj it doesn't link
quad.obj : error LNK2001: unresolved external symbol _CoGetMalloc@8
quad.obj : error LNK2001: unresolved external symbol _CoTaskMemFree@4
quad.exe : fatal error LNK1120: 2 unresolved externals
Posted on 2002-03-10 01:53:44 by k0d
i've that errors to, and to resolve them i think that i include the ole32 libs... try to do that.... :)



include \masm32\include\ole32.inc
include \masm32\lib\ole32.lib


hoppe it resolves the problem...
:)

cyas

jean/Coder7345
Posted on 2002-03-10 07:44:06 by coder