Problems with gasp

Richard Earnshaw rearnsha@armltd.co.uk
Sat Feb 18 08:17:00 GMT 1995


I'm having some dificulty with variable expansion in gasp.  I'd like to concatenate
a variable with an additional string and put it back in the same variable.  The
code I have is, essentially:

	Temp	.ASSIGNC 	"string"
	...
	Temp	.ASSIGNC	"\&Temp'extra"

but the result of this is the string \&Temp'extra, not "stringextra" as desired.

This does not happen if I concatenate a macro parameter with extra, eg
	.MACRO Foo Temp
	bar	.ASSIGNC	"\Temp'foo"
	.ENDM

	Foo xxx

gives "xxxfoo" as desired.
	
Is this not inconsitent?

Additionally, here's a patch for istrue() in gasp.c, for strings NE never returns
true. 

*** gasp.c~     Thu Jan 19 21:04:07 1995
--- gasp.c      Sat Feb 18 16:04:40 1995
***************
*** 2330,2336 ****
          res = 0;
        }
        else
!       res = cond == EQ && same;
      }
    else
      /* This is a numeric expression */
--- 2330,2336 ----
          res = 0;
        }
        else
!       res = cond != EQ ^ same;
      }
    else
      /* This is a numeric expression */




More information about the Gas2 mailing list