Re: HLA v1.69 crashes over this source!

From: Randall Hyde (randyhyde_at_earthlink.net)
Date: 08/23/04


Date: Mon, 23 Aug 2004 05:31:33 GMT


"Purple_Cochoa" <green_cochoa@yahoo.com> wrote in message
news:cg790h$100@odah37.prod.google.com...
> Hi,
>
> I've recently downloaded and messed around with Randy
> Hyde's HLA version 1.69 from webster. As I am a rank
> beginner, I'm sure I've made horrible mistakes in the
> HLA syntax, especially if I'm right, with the JUMP labels.
>
> However, what's surprising is that instead of just
> reporting the error, hlaparse.exe also crashes on my
> WinXP box, bringing up the usual, "hlaparse has encountered
> a error and needs to close bla-bla-bla" XP dialog box.
>
> The source HLA crashes over is a simple, (though probably
> syntactically incorrect), ten liner and is appended to
> this post.
>
> I just thought I'd bring this to Randy's attention so
> that he'll be able to sort out the fault in HLA v1.69.
>
> The source that crashes HLA v1.69:
>

Here's the short version:

program GrandTotal;

static
 NoOfInputs: int32 := 0;

begin GrandTotal;

     #error
     (
          @typename( (NoOfInputs + 1))
     );

end GrandTotal;

This one is definitely filed under "How come that was
never caught before?" The bug was in code that
gets executed quite a bit. I guess the bad pointer
reference that crashed HLA just happened to contain
good data most of the time.

In any case, it has been fixed and the fix will appear
in HLA v1.70.

In the meantime, the work-around is real easy --
Just create a syntactically correct HLA program and
it will compile without any problems. The major problem
in your example (that tripped this defect) is that memory
addresses do not take the form: "(NoOfInputs + 1)".
Instead, write this as "NoOfInputs[1]" (I'm assuming you're
trying to print the data at the first byte past NoOfInputs, if
you're actually trying to print the value of NoOfInput plus
one, then you need to use the INC or ADD instruction to
do the addition before printing this value out).
Cheers,
Randy Hyde
P.S. Thanks for the defect report. Reporting these errors
rather than shining them on helps make HLA a much better
product.



Relevant Pages

  • HLA v1.69 crashes over this source!
    ... I've recently downloaded and messed around with Randy ... HLA syntax, especially if I'm right, with the JUMP labels. ... mov(CurrentInput, eax); ... inc(NoOfInputs); ...
    (alt.lang.asm)
  • Re: Canonical format for header files
    ... > possible things between the various Assemblers Projects. ... Randy wrote AoA to support HLA, whereas RosAsm is NOT a "Windows ... Randy had written 16-bit AoA a long while back and other people used ... "HLA standard library" instead...this permitted the same successful ...
    (alt.lang.asm)
  • Re: Asm For Nerds
    ... I do believe in one of your comments, Randy, about Public Domain. ... If Rene can get people to believe in his RosASM material, ... If Randy can get people to believe in his HLA material, ... HLA becomes the very crutch that prevents beginners from moving into ...
    (alt.lang.asm)
  • Re: Anybody here endure C/Cpp? (.h to .inc conversion)
    ... > Rene built houses and now Randy builds ships? ... Not to say there couldn't be problems or that HLA necessarily avoids these ... > for all people who have to learn assembly programming but don't ... amount of bugs I throw into HLL code and that I throw into ASM code...which ...
    (alt.lang.asm)
  • Re: A (mild-mannered) defense of RosAsm
    ... then it's "HLL pre-parser" but, irony of ironies, where did Rene get ... his own "HLL pre-parsers" that he added to his ... And Randy writes the most comprehensive assembly language references ... Please, use RosAsm and don't use HLA, if that's what you want to do, ...
    (alt.lang.asm)