Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Assembly x86 > Seg fault with ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 31 Topic 4541 of 4821
Post > Topic >>

Seg fault with hla 1.99 on Fedora 8 linux

by DaveR <spamtrap@[EMAIL PROTECTED] > Feb 25, 2008 at 01:18 PM

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@[EMAIL PROTECTED]
 ] $ 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@[EMAIL PROTECTED]
 ] $ more HelloWorld.hla
program helloWorld;
#include( "stdlib.hhf" );

begin helloWorld;

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

end helloWorld;
[david@[EMAIL PROTECTED]
 ] $ 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 p*****, 1499 bytes.
----------------------
Linking via [ld    -o "HelloWorld"  "HelloWorld.o" "/home/david/local/
hla/hlalib/hlalib.a"]
[david@[EMAIL PROTECTED]
 ] $ ./HelloWorld
Hello, World of Assembly Language

====BROKEN=====

[david@[EMAIL PROTECTED]
 ] $ 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@[EMAIL PROTECTED]
 ] $ 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 p*****, 1644 bytes.
----------------------
Linking via [ld    -o "HelloWorldWithVar"  "HelloWorldWithVar.o" "/
home/david/local/hla/hlalib/hlalib.a"]
[david@[EMAIL PROTECTED]
 ] $ ./HelloWorldWithVar
Hello, World of Assembly Language
InitDemo's value is Segmentation fault
 




 31 Posts in Topic:
Seg fault with hla 1.99 on Fedora 8 linux
DaveR <spamtrap@[EMAI  2008-02-25 13:18:12 
Re: Seg fault with hla 1.99 on Fedora 8 linux
nbaker2328 <spamtrap@[  2008-02-25 14:20:57 
Re: Seg fault with hla 1.99 on Fedora 8 linux
DaveR <spamtrap@[EMAI  2008-02-25 15:11:30 
Re: Seg fault with hla 1.99 on Fedora 8 linux
Frank Kotler <spamtra  2008-02-26 01:06:44 
Re: Seg fault with hla 1.99 on Fedora 8 linux
nbaker2328 <spamtrap@[  2008-02-25 18:23:49 
Re: Seg fault with hla 1.99 on Fedora 8 linux
nbaker2328 <spamtrap@[  2008-02-25 18:32:17 
Re: Seg fault with hla 1.99 on Fedora 8 linux
DaveR <spamtrap@[EMAI  2008-02-26 01:36:42 
Re: Seg fault with hla 1.99 on Fedora 8 linux
nbaker2328 <spamtrap@[  2008-02-26 17:09:25 
Re: [Clax86list] Seg fault with hla 1.99 on Fedora 8 linux
Charles Crayne <spamt  2008-02-27 13:54:44 
Re: Seg fault with hla 1.99 on Fedora 8 linux
DaveR <spamtrap@[EMAI  2008-02-27 16:14:55 
Re: Seg fault with hla 1.99 on Fedora 8 linux
Frank Kotler <spamtra  2008-02-28 10:47:59 
Re: [Clax86list] Seg fault with hla 1.99 on Fedora 8 linux
Charles Crayne <spamt  2008-02-27 18:25:11 
Re: Seg fault with hla 1.99 on Fedora 8 linux
DaveR <spamtrap@[EMAI  2008-02-28 02:26:57 
Re: [Clax86list] Seg fault with hla 1.99 on Fedora 8 linux
Charles Crayne <spamt  2008-02-28 15:12:48 
Re: Seg fault with hla 1.99 on Fedora 8 linux
DaveR <spamtrap@[EMAI  2008-02-28 15:25:38 
Re: Seg fault with hla 1.99 on Fedora 8 linux
Frank Kotler <spamtra  2008-02-29 05:59:51 
Re: Seg fault with hla 1.99 on Fedora 8 linux
nbaker2328 <spamtrap@[  2008-02-28 16:50:12 
Re: Seg fault with hla 1.99 on Fedora 8 linux
nbaker2328 <spamtrap@[  2008-02-28 16:43:23 
Re: Seg fault with hla 1.99 on Fedora 8 linux
Frank Kotler <spamtra  2008-02-29 08:52:26 
Re: Seg fault with hla 1.99 on Fedora 8 linux
Herbert Kleebauer <sp  2008-02-29 14:25:43 
Re: Seg fault with hla 1.99 on Fedora 8 linux
nbaker2328 <spamtrap@[  2008-02-28 19:51:09 
Re: [Clax86list] Seg fault with hla 1.99 on Fedora 8 linux
Charles Crayne <spamt  2008-02-28 22:51:26 
Re: [Clax86list] Seg fault with hla 1.99 on Fedora 8 linux
Frank Kotler <spamtra  2008-03-13 21:32:15 
Re: Seg fault with hla 1.99 on Fedora 8 linux
nbaker2328 <spamtrap@[  2008-02-29 22:43:55 
Re: Seg fault with hla 1.99 on Fedora 8 linux
Frank Kotler <spamtra  2008-03-01 20:36:34 
Re: Seg fault with hla 1.99 on Fedora 8 linux
nbaker2328 <spamtrap@[  2008-03-01 02:29:04 
Re: Seg fault with hla 1.99 on Fedora 8 linux
nbaker2328 <spamtrap@[  2008-03-01 10:55:15 
Re: Seg fault with hla 1.99 on Fedora 8 linux
nbaker2328 <spamtrap@[  2008-03-02 18:22:15 
Re: Seg fault with hla 1.99 on Fedora 8 linux
nbaker2328 <spamtrap@[  2008-03-17 01:41:18 
Re: Seg fault with hla 1.99 on Fedora 8 linux
Frank Kotler <spamtra  2008-03-17 19:27:52 
Re: Seg fault with hla 1.99 on Fedora 8 linux
"rhyde@[EMAIL PROTEC  2008-03-27 09:31:35 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 6 17:43:29 CDT 2008.