Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ooops

0 views
Skip to first unread message

Damon Gallaty

unread,
Jun 1, 1992, 6:06:57 PM6/1/92
to
Yikes! I meant to put

END start

at the end of that example. I ALWAYS forget that...*sigh*...:)

--
"Have you ever danced with the Devil by the pale moonlight?
I ask that of all my prey. I just like the sound of it..." - the Joker
************************************************************************
Damon Gallaty E-mail: dg...@cad.gatech.edu

Scott - Nelson

unread,
Jun 2, 1992, 3:06:19 AM6/2/92
to
Some questions about EQU as defined in the proposed '88 standard.

1.) what does 2*3-1*3 equal? In other words, is there an order of
operator precedence? Are parentheses legal?

2.) I recall hearing that EQU works like text substitution, but can
find no documentation in supports of this. Is there any? Am I wrong
about this?

3.) if "TWO EQU 3-1" what does "TWO-TWO" equal? That is, does it
evaluate to 3-1-3-1, or to (3-1)-(3-1) (or something else?)

4.) Are forward referenced labels allowed in an EQU?
|+------------------------------------------------------------------+|
I know what I'm doing better than anybody else,
because nobody else has any idea what I am doing.
<<<Scott...@cup.portal.com>>>

William Shubert

unread,
Jun 2, 1992, 11:11:04 AM6/2/92
to
Scott...@cup.portal.com (Scott - Nelson) wondered:

> Some questions about EQU as defined in the proposed '88 standard.
>
>1.) what does 2*3-1*3 equal? In other words, is there an order of
> operator precedence? Are parentheses legal?
>
>2.) I recall hearing that EQU works like text substitution, but can
> find no documentation in supports of this. Is there any? Am I wrong
> about this?
>
>3.) if "TWO EQU 3-1" what does "TWO-TWO" equal? That is, does it
> evaluate to 3-1-3-1, or to (3-1)-(3-1) (or something else?)
>
>4.) Are forward referenced labels allowed in an EQU?

I can't really answer for the '88 standard, but KotH behaves as follows:

1) 2*3-1*3 = 6-3 = 3. That is, normal order of operation applies.
Parenthesis are OK, too.

2) Under KotH, EQU does NOT work like text substitution. It works like
parenthesized text substiution.

3) if "TWO EQU 3-1", then, under 2) above, "TWO-TWO" is "(3-1)-(3-1)" so
you get zero.

4) Forward labels are allowed in KotH. KotH is a two pass assembler; the
first pass it determines the location of each label, or the expression
that an EQU becomes. The second pass it resolves all expressions. If
you try to use EQUs recursively, it will spot that and let you know.
-Bill (w...@iwarp.intel.com)

0 new messages