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

HLA compile-time variables

6 views
Skip to first unread message

Hugh Aguilar

unread,
Dec 20, 2011, 7:51:15 PM12/20/11
to
I'm confused about HLA compile-time variables. I want to use them as
constants, but HLA complains about this.

Here is my offending macro:

#macro forth0( mask , string forth_name ) : entrance, start, finish,
beyond, node;
entrance:
commence0;
start:
#terminator end_forth0;
finish:
conclude0;
beyond:
static
node : header := header:[ head, 0, &entrance, forth_name, 0, mask,
&start, &finish, &beyond, 0, 0 ];
?head := &node;
endstatic;
#endmacro;

Don't worry about most of this; it is okay. The COMMENCE0 and
CONCLUDE0 macros generate code okay. the header record is getting
filled okay, and it is assembled at the NODE label in the STATIC
section. The problem is this line:
?head := &node;

That gives me this error message:

Error in file "ToyForth.hla" at line 1156 [errid:536/oututils.c]:
Object "_0954_node_t_" was used as an address expression in the
statement at line 153, it must be defined within the scope of the
object.
Near: << ; >>

Line 153 is the line mentioned above inside of the macro. Line 1156 is
the last line of the program:
end ToyForth;
We seem to have gotten past all of the parsing, and we are into the
HLA pass that resolves all of the hanging references.

I also have a few dozen error messages that object to my using a
compile-time variable as a CASE argument in a SWITCH statement. All of
these variables were originally set to equal HEAD immediately after
the FORTH0 and END_FORTH0 macros were called. Those get set once and
are never changed, so they are effectively constants. By comparison,
HEAD gets set every time that the END-FORTH0 macro is called. There is
a line early on in the file that initializes HEAD to 0 (it is the head
of the linked list that is being built by all of those FORTH0 and
END_FORTH0 macros).

If none of this makes any sense, let me know --- I will try to
reproduce the error with a short test file that would be more easily
understood. Thanks in advance for your help.

Nathan Baker

unread,
Dec 20, 2011, 11:39:40 PM12/20/11
to

"Hugh Aguilar" <hughag...@yahoo.com> wrote in message
news:130586b0-2d32-4c4a...@l24g2000yqm.googlegroups.com...
>
> If none of this makes any sense, let me know --
>

It doesn't make any sense to me. Perhaps see if someone in an HLA-specific
forum has any experience with the CTL.

http://www.masm32.com/board/index.php?board=9.0

Nathan.


0 new messages