Re: Seg fault with hla 1.99 on Fedora 8 linux
- From: nbaker2328 <spamtrap@xxxxxxxxxx>
- Date: Mon, 25 Feb 2008 14:20:57 -0800 (PST)
On Feb 25, 4:18 pm, DaveR <spamt...@xxxxxxxxxx> wrote:
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
Just tried it with v1.97 and it worked without producing a seg-fault.
So this is a bug that was introduced sometime between then and v1.99!
Nathan.
.
- Follow-Ups:
- Re: Seg fault with hla 1.99 on Fedora 8 linux
- From: DaveR
- Re: Seg fault with hla 1.99 on Fedora 8 linux
- References:
- Seg fault with hla 1.99 on Fedora 8 linux
- From: DaveR
- Seg fault with hla 1.99 on Fedora 8 linux
- Prev by Date: Seg fault with hla 1.99 on Fedora 8 linux
- Next by Date: Re: MASM ASSUME directives...
- Previous by thread: Seg fault with hla 1.99 on Fedora 8 linux
- Next by thread: Re: Seg fault with hla 1.99 on Fedora 8 linux
- Index(es):
Relevant Pages
|