Discussion:
programming: how to EQUate a semicolon ?
Add Reply
R.Wieser
2024-11-25 08:13:22 UTC
Reply
Permalink
Hello all,

Using Borlands Tasm32 v5.0 I've got the next code (example) :

foo EQU call bar

and use it like this:

foo,1234

Now I want to suppress the calling of "bar", and thought about just changing
the "foo" equate with a semi-colon (imagine many calls to "bar" which
disappear as a result of a single change). The end result would than look
like this :

foo EQU ;

;,1234

(after being resolved)

The problem is that I can't seem to find a way to EQUate a semicolon (as its
regarded to be the start of a comment). :-(

Does anyone know how its supposed to be done ?

Remarks:

Borlands Tasm32 doesn't have a pre-processor.

I already found a solution using an empty macro, but would like to know if
it can be done with an EQUate too (just like the other one. it looks
better/cleaner to me).

Regards,
Rudy Wieser
JJ
2024-11-26 07:27:13 UTC
Reply
Permalink
Post by R.Wieser
Hello all,
foo EQU call bar
foo,1234
Now I want to suppress the calling of "bar", and thought about just changing
the "foo" equate with a semi-colon (imagine many calls to "bar" which
disappear as a result of a single change). The end result would than look
foo EQU ;
;,1234
(after being resolved)
The problem is that I can't seem to find a way to EQUate a semicolon (as its
regarded to be the start of a comment). :-(
Does anyone know how its supposed to be done ?
Borlands Tasm32 doesn't have a pre-processor.
I already found a solution using an empty macro, but would like to know if
it can be done with an EQUate too (just like the other one. it looks
better/cleaner to me).
Regards,
Rudy Wieser
`EQU` is for defining a constant. It can't work like a macro.

In term of value/data, `;` is valid only as a character/string. So you're
missing something.
R.Wieser
2024-11-26 07:51:46 UTC
Reply
Permalink
JJ,
Post by JJ
`EQU` is for defining a constant. It can't work like a macro.
Whut? I didn't try to suggest that. I just mentioned a macro as a solution
to my problem. You know, instead of

foo EQU ;

I used

foo macro args:rest
endm

, which Works like a charm.
Post by JJ
In term of value/data, `;` is valid only as a character/string.
So you're missing something.
:-) Why did you think I posted this question ?

I tried a number of methods. Including using TEXTEQU and putting the
semicolon between "<" and ">" (which I imagined should work for EQUates as
(double)quotes work for DB).

Alas, the line was cut off (as shown in the .LST file) at the semi-colon
every time. :-|

Regards,
Rudy Wieser
R.Wieser
2024-12-07 07:40:03 UTC
Reply
Permalink
Post by R.Wieser
foo EQU ;
;,1234
(after being resolved)
The problem is that I can't seem to find a way to EQUate a semicolon (as
its regarded to be the start of a comment). :-(
I take it noone has an idea how to EQUate a semi-colon ?

Bummer.

Regards,
Rudy Wieser

Loading...