Seg fault with hla 1.99 on Fedora 8 linux



Hi

I'm just starting out trying to learn assembler, using HLA and the
"Art of Assembler". I am having problems executing very simple demo
programs.

A hello world program works, however as soon as I introduce a
variable, I get a segfault. I have given a working and broken example
below.

Apologies if I have done something stupid(!) , but any help would be
appreciated. Please let me know if you need anymore information to
help...

Kind Regards
David

[david@beechwood:~/local/AoA/Volume1/Ch02 ] $ uname -a
Linux beechwood.home 2.6.23.15-137.fc8 #1 SMP Sun Feb 10 17:48:34 EST
2008 i686 i686 i386 GNU/Linux

====WORKING=====

[david@beechwood:~/local/AoA/Volume1/Ch02 ] $ more HelloWorld.hla
program helloWorld;
#include( "stdlib.hhf" );

begin helloWorld;

stdout.put( "Hello, World of Assembly Language", nl );

end helloWorld;
[david@beechwood:~/local/AoA/Volume1/Ch02 ] $ hla -v HelloWorld.hla
HLA (High Level Assembler)
Use '-license' to see licensing information.
Version Version 1.99 build 12923 (prototype)
ELF output
OBJ output using internal FASM back-end
-test active

HLA Lib Path: /home/david/local/hla/hlalib/hlalib.a
HLA include path: /home/david/local/hla/include
HLA temp path:
Files:
1: HelloWorld.hla

Compiling 'HelloWorld.hla' to 'HelloWorld.o'
using command line:
[hlaparse -level=high -v -sf -celf -test "HelloWorld.hla"]

----------------------
HLA (High Level Assembler) Parser
use '-license' to view license information
Version Version 1.99 build 12923 (prototype)
-t active
File: HelloWorld.hla
Output Path: ""
Language Level: high

Compiling "HelloWorld.hla" to "HelloWorld.o"
Compilation complete, 14837 lines, 0.214 seconds, 69332 lines/
second
Using flat assembler version C1.66
3 passes, 1499 bytes.
----------------------
Linking via [ld -o "HelloWorld" "HelloWorld.o" "/home/david/local/
hla/hlalib/hlalib.a"]
[david@beechwood:~/local/AoA/Volume1/Ch02 ] $ ./HelloWorld
Hello, World of Assembly Language

====BROKEN=====

[david@beechwood:~/local/AoA/Volume1/Ch02 ] $ more
HelloWorldWithVar.hla
program helloWorld;
#include( "stdlib.hhf" );

static
InitDemo: int32 := 5;

begin helloWorld;

stdout.put( "Hello, World of Assembly Language", nl );
stdout.put( "InitDemo's value is ", InitDemo, nl );

end helloWorld;
[david@beechwood:~/local/AoA/Volume1/Ch02 ] $ hla -v
HelloWorldWithVar.hla
HLA (High Level Assembler)
Use '-license' to see licensing information.
Version Version 1.99 build 12923 (prototype)
ELF output
OBJ output using internal FASM back-end
-test active

HLA Lib Path: /home/david/local/hla/hlalib/hlalib.a
HLA include path: /home/david/local/hla/include
HLA temp path:
Files:
1: HelloWorldWithVar.hla

Compiling 'HelloWorldWithVar.hla' to 'HelloWorldWithVar.o'
using command line:
[hlaparse -level=high -v -sf -celf -test "HelloWorldWithVar.hla"]

----------------------
HLA (High Level Assembler) Parser
use '-license' to view license information
Version Version 1.99 build 12923 (prototype)
-t active
File: HelloWorldWithVar.hla
Output Path: ""
Language Level: high

Compiling "HelloWorldWithVar.hla" to "HelloWorldWithVar.o"
Compilation complete, 15683 lines, 0.223 seconds, 70327 lines/
second
Using flat assembler version C1.66
3 passes, 1644 bytes.
----------------------
Linking via [ld -o "HelloWorldWithVar" "HelloWorldWithVar.o" "/
home/david/local/hla/hlalib/hlalib.a"]
[david@beechwood:~/local/AoA/Volume1/Ch02 ] $ ./HelloWorldWithVar
Hello, World of Assembly Language
InitDemo's value is Segmentation fault

.



Relevant Pages

  • Re: Rocket Science
    ... >> Also, logically, if MASM is the underlying assembler being used by ... then MASM must always be being run in addition to HLA so ... the MASM or FASM or whatever underlying assembler's speed into its own ...
    (alt.lang.asm)
  • Re: .EXE -> .ASM -> .EXE
    ... HLA, why would they even come you your forum? ... becoming RosAsm users). ... needs to learn assembly language. ... I do think it would be much more an improvement you write an assembler, ...
    (alt.lang.asm)
  • Re: Questions about the HLA installation...
    ... > HLA, assembler and linker in order - depending on your command line ... Windows98 is probably the 'stablest' Windows ... *and* maintain in bare bones assembler. ... all of it pales in comparsion to his 'adventure' with Iraq. ...
    (alt.lang.asm)
  • Re: HLA StdLib2 criticism
    ... HLC.EXE with an already existing C compiler and calls it HLC system. ... Suppose someone creates a new language and calls it "High Level ... Assembler" (HLA). ...
    (alt.lang.asm)
  • Re: Question regarding "HLA" and its validity.
    ... HLA is not an assembler. ... Even Master Self-Esteemed Randall Hyde admits that HLA ... > at all with RosAsm and HLA coexisting peacefully. ...
    (alt.lang.asm)