EQU expressions taking up more lines 
Author Message
 EQU expressions taking up more lines

Hello!
I need to use very long EQU expressions, taking up more than one line, but
TASM seems not to manage correctly the line-continuation character (\).
For instance, the following:

a        EQU \
         0FFh, 015h, 0E0h, \
         0E9h, 009h, 062h               ;line  37 in TEST.ASM
PATTERNa DB a                           ;line 915 in TEST.ASM
VARIABLE DB ?

doesn't assemble and produces these error messages:

Assembling file:   TEST.ASM
0E9h, 009h, 062h
**Error** TEST.ASM(37) Illegal instruction
PATTERNa DB a
**Error** TEST.ASM(915) Undefined symbol: VARIABLE

(so, the backslash seems to make TASM process the line after PATTERNa,
instead of the second line of the EQU expression).

Solutions or suggestions? Thank you!

Marco



Wed, 18 Jul 2001 03:00:00 GMT  
 EQU expressions taking up more lines
Try something like this:

foo equ some long thing
bar equ another long thing
foobar equ foo bar

Then use foobar to get the longest thing



Wed, 18 Jul 2001 03:00:00 GMT  
 EQU expressions taking up more lines


Quote:
> Hello!
> I need to use very long EQU expressions, taking up more than one line, but
> TASM seems not to manage correctly the line-continuation character (\).
> For instance, the following:

The easiest solution would probably be to use MASM instead -- it
assembles your code the way it as.


Thu, 19 Jul 2001 03:00:00 GMT  
 EQU expressions taking up more lines


|> Hello!
|> I need to use very long EQU expressions, taking up more than one line, but
|> TASM seems not to manage correctly the line-continuation character (\).
|> For instance, the following:
|
|The easiest solution would probably be to use MASM instead -- it
|assembles your code the way it as.

I don't know about that. MASM has the infamous 256 bytes limit (no line
may exceed ~256 bytes, even with \ at the end of the line).

Maybe they've updated it now?



Thu, 19 Jul 2001 03:00:00 GMT  
 EQU expressions taking up more lines

Quote:
> I need to use very long EQU expressions, taking up more
> than one line, but TASM seems not to manage correctly
> the line-continuation character (\).

Try using one of TASM's MASM-compatibility directives:

                In source file    On command line
TASM 1.x, 2.x   MASM51            /jMASM51
TASM 3.0+       VERSION M510      /uM510

Setting version M510 enables:
- SUBSTR, CATSTR, SIZESTR, and INSTR macro directives
- Strings and other tokens can be extended across
  multiple lines if a \ (backslash) is the last
  character on the line
- Support of the :: (double colon) directive

Using the QUIRKS directive as well enables certain other
MASM 5.10 features:


- Variables are redefinable inside PROCs
- Functions defined with PROC/ENDP are automatically
  made PUBLIC

According to TASM 5.0 docs, maximum line length is 1024
when using the backslash for line continuation.

February 1st, 1999
Morten Elling



Fri, 20 Jul 2001 03:00:00 GMT  
 EQU expressions taking up more lines


[ ... ]

Quote:
> |The easiest solution would probably be to use MASM instead -- it
> |assembles your code the way it as.

> I don't know about that. MASM has the infamous 256 bytes limit (no line
> may exceed ~256 bytes, even with \ at the end of the line).

If his lines end up exceeding 255 characters (or so) yes, MASM would
be a problem as well.  Yes, as of 6.13, it still has this limitation.


Fri, 20 Jul 2001 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. python-mode - running a script that takes command line arguments

2. (newbie) taking cmd line args

3. multi-line expressions

4. Command Line Expression Calculator

5. New Lines Regular Expressions (RegExp)

6. Why not LABEL EQU * ?

7. EQU Question

8. using EQU for constant definition

9. basic EQU ... question

10. EQU s???

11. Inline Assembly: Using the EQU Directive

12. Assembler MACRO and EQU problem

 

 
Powered by phpBB® Forum Software