LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-12-2014, 10:04 PM   #1
johnconnor
LQ Newbie
 
Registered: Mar 2014
Posts: 2

Rep: Reputation: Disabled
Problems with HLA (high level assamber)


hi

i am studying programming languages on my own, well i am trying to get started with assambler,,,,using the book "the art of assambly language",,,,i am installing the HLA,,, i had 2 problems,,,,this is what i did,,,,

1. downloaded the linux.hla.tar.gz from webster, along with the libsrc tar files

2. decompressed and extracted all packeges to /usr/hla

3. created a .bashrc file in my /home/USER directory,, as per book instructions....i wrote the .bashrc file as follows....

"""

PATH=$DBROOT/bin:$DBROOT/pgm:/usr/hla:$PATH

hlalib=/usr/hla/hlalib
export hlalib
hlainc=/usr/hla/include
export hlainc
hlatemp=/tmp
export hlatemp


"""

4. i tried to compile the first hello world program....as per instructions,,,,wrote in a gedit new file this:

///

program HelloWorld;
#include( "stdlib.hhf" )
begin HelloWorld;

stdout.put( "hello, world of assambly language", nl );

end HelloWorld;

///

5. saved the file as hw.hla in /usr/hla directory....(the same directory where hla and hlaparse executables are)

the first problem is with the hla itself....when i am a regular user...i type "hla" directly into bash,,,and i get the regular intro screen

"""

john@john-desktop ~ $ hla
Usage: hla options filename(s)

HLA (High Level Assembler - HLABE back end, LD linker)
Version 2.16 build 4409 (prototype)

-? Display help message.
-license Display license information.

"""

but when i tried an use it on su...bash doesnt locate the hla executable...and print... "order not found"....

then...i tried on SU typing "/usr/hla/hla",,,,and that work well....but when i try to compile the hw.hla file...this is what i get...

without SU:

"""

john@john-desktop ~ $ hla -v hw
HLA (High Level Assembler)
Use '-license' to see licensing information.
Version 2.16 build 4409 (prototype)
ELF output
OBJ output using HLA Back Engine
-test active

HLA Lib Path: /usr/hla/hlalib/hlalib.a
HLA include path: /usr/hla/include
HLA temp path:
Files:
1: hw.hla

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

----------------------
HLA (High Level Assembler) Parser
use '-license' to view license information
Version 2.16 build 4409 (prototype)
-test active
File: hw.hla
Output Path: ""
hlainc Path: "/usr/hla/include"
hlaauxinc Path: ""
Compiler generating code for Linux OS
Back-end assembler: HLABE
Language Level: high

Could not open hw.hla
john@john-desktop ~ $

"""""

with SU, typing "/usr/hla/hla -v hw"

"""

john-desktop john # /usr/hla/hla -v hw
HLA (High Level Assembler)
Use '-license' to see licensing information.
Version 2.16 build 4409 (prototype)
ELF output
OBJ output using HLA Back Engine
-test active

HLA Lib Path: /usr/hla/hlalib/hlalib.a
HLA include path: /usr/hla/include
HLA temp path:
Files:
1: hw.hla

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

----------------------
sh: 1: hlaparse: not found
john-desktop john #

"""

then i tried cd to the directory containing hlaparse, hla, and hw.hla, but got the same output as before....i dont understand why it says "sh: 1: hlaparse: not found" i thought the .bashrc file took care of that,,,,please could someone guide my a little....i know this is advanced for a beginner but i really what to learn fully how programming actually works....

thanks!!
 
Old 04-12-2014, 10:42 PM   #2
johnconnor
LQ Newbie
 
Registered: Mar 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
problems when installing hla high level assambler

hi

i am studying programming languages on my own, well i am trying to get started with assambler,,,,using the book "the art of assambly language",,,,i am installing the HLA,,, i had 2 problems,,,,this is what i did,,,,

1. downloaded the linux.hla.tar.gz from webster, along with the libsrc tar files

2. decompressed and extracted all packeges to /usr/hla

3. created a .bashrc file in my /home/USER directory,, as per book instructions....i wrote the .bashrc file as follows....

"""

PATH=$DBROOT/bin:$DBROOT/pgm:/usr/hla:$PATH

hlalib=/usr/hla/hlalib
export hlalib
hlainc=/usr/hla/include
export hlainc
hlatemp=/tmp
export hlatemp


"""

4. i tried to compile the first hello world program....as per instructions,,,,wrote in a gedit new file this:

///

program HelloWorld;
#include( "stdlib.hhf" )
begin HelloWorld;

stdout.put( "hello, world of assambly language", nl );

end HelloWorld;

///

5. saved the file as hw.hla in /usr/hla directory....(the same directory where hla and hlaparse executables are)

the first problem is with the hla itself....when i am a regular user...i type "hla" directly into bash,,,and i get the regular intro screen

"""

john@john-desktop ~ $ hla
Usage: hla options filename(s)

HLA (High Level Assembler - HLABE back end, LD linker)
Version 2.16 build 4409 (prototype)

-? Display help message.
-license Display license information.

"""

but when i tried an use it on su...bash doesnt locate the hla executable...and print... "order not found"....

then...i tried on SU typing "/usr/hla/hla",,,,and that work well....but when i try to compile the hw.hla file...this is what i get...

without SU:

"""

john@john-desktop ~ $ hla -v hw
HLA (High Level Assembler)
Use '-license' to see licensing information.
Version 2.16 build 4409 (prototype)
ELF output
OBJ output using HLA Back Engine
-test active

HLA Lib Path: /usr/hla/hlalib/hlalib.a
HLA include path: /usr/hla/include
HLA temp path:
Files:
1: hw.hla

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

----------------------
HLA (High Level Assembler) Parser
use '-license' to view license information
Version 2.16 build 4409 (prototype)
-test active
File: hw.hla
Output Path: ""
hlainc Path: "/usr/hla/include"
hlaauxinc Path: ""
Compiler generating code for Linux OS
Back-end assembler: HLABE
Language Level: high

Could not open hw.hla
john@john-desktop ~ $

"""""

with SU, typing "/usr/hla/hla -v hw"

"""

john-desktop john # /usr/hla/hla -v hw
HLA (High Level Assembler)
Use '-license' to see licensing information.
Version 2.16 build 4409 (prototype)
ELF output
OBJ output using HLA Back Engine
-test active

HLA Lib Path: /usr/hla/hlalib/hlalib.a
HLA include path: /usr/hla/include
HLA temp path:
Files:
1: hw.hla

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

----------------------
sh: 1: hlaparse: not found
john-desktop john #

"""

then i tried cd to the directory containing hlaparse, hla, and hw.hla, but got the same output as before....i dont understand why it says "sh: 1: hlaparse: not found" i thought the .bashrc file took care of that,,,,please could someone guide my a little....i know this is advanced for a beginner but i really what to learn fully how programming actually works....

thanks!!
 
Old 04-13-2014, 04:47 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
hlaparse: not found
The PATH text you added to .bashrc doesn't work unless you do :
$ source .bashrc
... or reboot the OS.

It is also suggested http://www.plantation-productions.co...xDownload.html
... that you can have the two executable´s hla, halparse in a system PATH:
$ sudo cp hla /usr/local/bin/
$ sudo cp hlaparse /usr/local/bin/

-
(( Other assembler´s : $ sudo apt-get install nasm yasm ))

-
 
Old 04-13-2014, 06:25 PM   #4
gerdesj
LQ Newbie
 
Registered: Apr 2014
Posts: 3

Rep: Reputation: Disabled
I've fairly quickly scanned your post a couple of times (its quite long!)

The .bashrc and hence PATH is for your user only and will probably not get passed through to your root user via su.

Assuming you own the machine and given that you don't mention a distro I suggest:

Install the program if possible to /usr/local/ so that the binaries end up in /usr/local/bin and libraries in /usr/local/lib etc

Your distro will almost certainly already have the relevant bits in PATH already.

The instructions given are probably for someone who only has non root shell access to a system. This way you are making it available to all users of your system.

Type "echo $PATH" when running as root to see whether the .bashrc is doing anything ...

Cheers
Jon
 
Old 04-13-2014, 07:43 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
I merged your two threads since they both held sensible responses, and ask that you
don't multi-post in the future.


Cheers,
Tink
 
  


Reply

Tags
bash, bashrc, installation, problem, programing


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Best Distribution for a high-level hardware and a developer XMasterrrr Linux - Newbie 10 08-21-2011 09:47 PM
High level ping user efuenteso General 1 08-12-2011 01:19 PM
High-level languages and kernel creation eveningsky339 Programming 5 04-27-2010 03:53 PM
Very high system level processing kenneho Linux - Server 10 01-12-2009 06:20 AM
help for high level shell script kushkothari Programming 13 10-30-2008 12:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration