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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
04-12-2014, 10:04 PM
|
#1
|
LQ Newbie
Registered: Mar 2014
Posts: 2
Rep:
|
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!!
|
|
|
04-12-2014, 10:42 PM
|
#2
|
LQ Newbie
Registered: Mar 2014
Posts: 2
Original Poster
Rep:
|
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!!
|
|
|
04-13-2014, 04:47 AM
|
#3
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
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 ))
-
|
|
|
04-13-2014, 06:25 PM
|
#4
|
LQ Newbie
Registered: Apr 2014
Posts: 3
Rep:
|
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
|
|
|
04-13-2014, 07:43 PM
|
#5
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
I merged your two threads since they both held sensible responses, and ask that you
don't multi-post in the future.
Cheers,
Tink
|
|
|
All times are GMT -5. The time now is 01:14 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|