The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: frktons on September 04, 2010, 12:42:51 PM

Title: ERROR while assembling improved TESTBED
Post by: frktons on September 04, 2010, 12:42:51 PM
Hi all.

I'm trying to insert a proc, inside the testbed, to format number of elapsed
cycles with thousand separator for readability purpose.

In a preliminary test to see if the new instructions assemble correctly I get
an:

Microsoft (R) Macro Assembler Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.

Assembling: C:\masm32\examples\clearbuftest\ClearBufferNew4.asm
C:\masm32\examples\clearbuftest\ClearBufferNew4.asm(232) : error A2070:invalid i
nstruction operands
MacroLoop(12): teration 1: Macro Called From
  C:\masm32\examples\clearbuftest\ClearBufferNew4.asm(232): Main Line Code
C:\masm32\examples\clearbuftest\ClearBufferNew4.asm(232) : error A2070:invalid i
nstruction operands
MacroLoop(12): teration 2: Macro Called From
  C:\masm32\examples\clearbuftest\ClearBufferNew4.asm(232): Main Line Code
_
Assembly Error


and the line 232 is where the ENDM alone stays.

Not being an Assembly Wizard, it could take me days to figure what is wrong.

Could anybody check the attached source and tell me where the error is?

Thanks

Frank
Title: Re: ERROR while assembling improved TESTBED
Post by: clive on September 04, 2010, 01:04:42 PM
Look at line 68, or generate a listing file with -Fl
Title: Re: ERROR while assembling improved TESTBED
Post by: frktons on September 04, 2010, 01:27:38 PM
Quote from: clive on September 04, 2010, 01:04:42 PM
Look at line 68, or generate a listing file with -Fl

The line 68 says:

      mov Number, sstr$(eax)


and according to the macro help, usage of sstr$ is:


     mov lpResult, sstr$(Integer)


So can't I use a register for Integer? Have I to mov it to an Integer variable?


Title: Re: ERROR while assembling improved TESTBED
Post by: frktons on September 04, 2010, 02:19:07 PM
WOOOOPSSSS !!!!
It returns a pointer, not a string.  :red

Solved