News:

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

problem using str$ macro

Started by Vineel Kumar Reddy Kovvuri, May 04, 2007, 01:02:59 PM

Previous topic - Next topic

Vineel Kumar Reddy Kovvuri



I am new to assembly plz tell me the difference b/w the following two statements
and cause for the error

;assume eax has value 5
print str$(eax),"sdfasdfasdf"   ; working fine

print "sdfasdfasdf",str$(eax)   ;Not assembling, it is showing the following error


error A4910: cannot open file: C:\masm32\bin\ml.err
test.asm(17) : error A2008:  : ADDR
chr$(3): Macro Called From
  print(3): Macro Called From
   test.asm(17): Main Line Code
test.asm(17) : error A2006:  : ??001E
print(3): Macro Called From
  test.asm(17): Main Line Code
test.asm(17) : error A2114:  : 1
print(3): Macro Called From
  test.asm(17): Main Line Code


thanks in advance



MichaelW

The first error indicates that ML.ERR is not in the same directory as ML.EXE. ML.ERR contains short descriptions of the errors, so for example instead of "error A2008:" you can get "error A2008: syntax error".

For the print macro there are limitations on the parameters that can be combined. To print a string in front of a number, you can use something like this:

print "sdfasdfasdf"
print str$(eax)

eschew obfuscation

askm

You have to...

make sure what is passed to it is what is expected.

You may have to...

use ADDR ...,
or use offset ...,
or get the idea.