The MASM Forum

General => The Campus => Topic started by: Mikl__ on October 04, 2016, 07:34:04 PM

Title: Symbols in name
Post by: Mikl__ on October 04, 2016, 07:34:04 PM
There are  rules to define a name for an identifier in masm (tasm) dialect

!
  • !character ― treats character literally, regardless of any special meaning it might otherwise have
  • Expression Operator
    •   ! logical NOT
    • != not equal
%
  • %text ― treats text as an expression, computes its value and replaces text with the result text may be either a numeric expression or a text equate
  • in begin of reserved words %bin, %cond, %cref, %macs, %out, %pcnt, %syms
&
  • &name ― substitutes actual value of macro parameter name
  • expression operators
    • & bit test
    • && logical AND
*multiplication
( )marks expression for priority evaluation
-minus, sign
+plus, sign
=
  • defines or redefines a numeric equate
  • expression operators == <= >=
{ }
  • marks expression for priority evaluation
  • Structure variable
|expression operand || logical OR
[ ]
  • the operator can be used to specity addition
  • register indirect memory operands
\the transition to the next line
:
  • Segment override
  • name: ― defines a near code label called name
  • FAR pointer in a segment::offset pair
  • :: global label
;
  • starts a comment
  • ;; ― suppresses storage of comment in a macro definition
'begin or end of string
"begin or end of string
< >
  • treats text literally, regardless of any special characters it might contain
  • expression operators
    • > greater then
    • >= greater then or equal to
    • < less than
    • <= less than or equal to
  • Structure variable
?
  • initializes with indeterminate data
  • in begin or end of reserved words ??date, ??filename, ??time, ??version, .data?, .fardata?
  • in expression operators as flag name carry?, overflow?, sign?, zero?, parity?
,separator character
.
  • structure member selector
  • in begin of reserved words .186-.686, .mmx, .ALPHA, .code, .stack, .data, .const, .cref,  .IF, .WHILE, .REPEAT
/division
$Represents the current location counter within the current segment
@
  • anonymous label @@, @b, @f
  • in begin of reserved words @32bit, @code, @codesize, @cpu, @curseg, @data, @datasize, @wordsize, @model, @stack, @fardata, @stack, @object
Why not use symbols "~", "^" and "#"? If symbols "~", "^", "#" are special characters, then it is possible to give examples of their use?
Title: Re: Symbols in name
Post by: hutch-- on October 04, 2016, 07:48:09 PM
The problem is with MASM is that it usually gives you an error of "Invalid character in file". The OPTION DOTNAME has been useful in that it has made many more names available.
Title: Re: Symbols in name
Post by: Mikl__ on October 04, 2016, 08:00:11 PM
Hi, hutch--!
thanks for the quick response to my question
as in the markup used on the site to make table borders visible?