Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 13th, 2005, 5:33 PM   #1
Riddle
Programmer
 
Riddle's Avatar
 
Join Date: May 2005
Location: Nar Shaddaa
Posts: 42
Rep Power: 0 Riddle is on a distinguished road
Send a message via ICQ to Riddle Send a message via AIM to Riddle Send a message via MSN to Riddle
Thumbs up High-level assembly

http://webster.cs.ucr.edu/AsmTools/HLA/index.html


Has anyone tried HLA? I like it more. Compare these two pieces of code (first can be assembled with debug (Windows utility), and the second is HLA code):

mov dx, 10b
mov ah, 9
int 21
mov ah, 4c
int 21
db "Hello world!",0d, 0a, '$'

program hello;
#include("stdlib.hhf")
begin hello;
stdout.put("Hello world!",nl);
end hello;

I think it's much easier to code, and plan on using this often.
Riddle is offline   Reply With Quote
Old Aug 13th, 2005, 5:58 PM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
But does it amount to the same thing, or does using HLA add more bloat? If so, what's the advantage over a higher-level language such as C?
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Aug 13th, 2005, 7:01 PM   #3
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
I have some prime Florida beachfront property....
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Aug 13th, 2005, 7:09 PM   #4
Riddle
Programmer
 
Riddle's Avatar
 
Join Date: May 2005
Location: Nar Shaddaa
Posts: 42
Rep Power: 0 Riddle is on a distinguished road
Send a message via ICQ to Riddle Send a message via AIM to Riddle Send a message via MSN to Riddle
Quote:
Originally Posted by Ooble
But does it amount to the same thing, or does using HLA add more bloat? If so, what's the advantage over a higher-level language such as C?
As far as I know, it's roughly the same, but easier to use (instead of mov dx, 10b, you'd use mov("dx", "10b"); (if I recall the documentation right). The advantages/disadvantages are the same as plain ole' asm (regardless of the assembler), and it's easier to use (not easier than C, but easier than nasm or masm or whatever assembler). I myself still plan on using C++ more than anything, don't get me wrong, but I plan on using HLA when doing anything assembly-related.
Riddle is offline   Reply With Quote
Old Aug 13th, 2005, 7:14 PM   #5
prolog
Programmer
 
Join Date: Jul 2005
Location: Germany
Posts: 69
Rep Power: 4 prolog is on a distinguished road
Hi,

@OP, yeah quite some time ago i digged a bit into it, consumed the manual and tried some stuff. But i never did anything productive with it. I kept more information about microprocessor-architectures and the way things work inside in memory than syntax. I'm definitely not an assembler-expert so i cannot tell whether this is sth good or not, but i found it usefull as u also have the possibility to issue basic instructions thus falling back to the basics. I don't know how much it has evolved now, i can only speak of round about 4 years ago but i never heard of it again until now. So my guess is, that it's not that important or brilliant, though interessting for me as a c++-programm wanting to get a little inside assembler.
__________________
-= C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do succeed, you will blow away your whole leg. =- Bjarne Stroustrup
prolog is offline   Reply With Quote
Old Aug 14th, 2005, 6:20 AM   #6
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Quote:
Originally Posted by Riddle
As far as I know, it's roughly the same, but easier to use (instead of mov dx, 10b, you'd use mov("dx", "10b"); (if I recall the documentation right). The advantages/disadvantages are the same as plain ole' asm (regardless of the assembler), and it's easier to use (not easier than C, but easier than nasm or masm or whatever assembler). I myself still plan on using C++ more than anything, don't get me wrong, but I plan on using HLA when doing anything assembly-related.
Thanks for the info.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Aug 14th, 2005, 6:43 AM   #7
Betov
Newbie
 
Join Date: Mar 2005
Posts: 11
Rep Power: 0 Betov is on a distinguished road
The only thing that is Assembly, in "HLA", is the name. If you take a quick look, inside the Package, you will see "FASM.exe", that is the real Assembler, which you can find at:

< http://flatassembler.net/ >

All HLA does, is obsfucating the real job of the Back-End Assembler, tranforming a Source written in HLA Syntax into a Source written in Assembly Syntax, and the only differences will be that you will be writting HLL, while believing that you are writting Assembly, that the Compilation time will be multipled by, at least 20, and that the debugging will be made 20 times more difficult.

You will also notice that, in the couple of cases when you will see something close to Asm, in an HLA Source, the HLA notation has been, on purpose, made as different as possible from real Assembly, for example by reversing, the Instructions Members order, to deliberately make it as difficult as possible to switch to a real Assembler after having fallen into the HLA traps.

If you wish to make use of a mix of HLL and Assembler, better is to use an HLL enabling with a decent Inline Assembly, or to use an Assembler with a powerfull Macros System, enabling HLLs Constructs by User defined Macros.


Betov.

< http://rosasm.org >
Betov is offline   Reply With Quote
Old Aug 14th, 2005, 7:02 AM   #8
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Nice post, Betov. The method of using macros to achieve a level of abstraction and to ensure consistency of usage of shared code was very common in the days before high-level languages such as C were widely available in the micro world. Even as they became available, we often couldn't afford the resources to use them. That is rarely the case nowadays. I can't imagine that enough effort would be put into a "high-level assembler" to make it truly effective, given the complexities of our current machines and the specialized knowledge needed to make the run at peak speeds/efficiencies.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Aug 14th, 2005, 7:03 AM   #9
stevengs
Professional Programmer
 
stevengs's Avatar
 
Join Date: May 2005
Location: Bad Nauheim, Germany
Posts: 436
Rep Power: 4 stevengs is on a distinguished road
Quote:
Originally Posted by DaWei
I have some prime Florida beachfront property....
hey! you told me you had prime Arizona beachfront property...
__________________
-Steven
"Is this a piece of your brain?" - Basil Fawlty
stevengs is offline   Reply With Quote
Old Aug 14th, 2005, 7:06 AM   #10
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
I sold the Arizona property to some tourist that had apparently spent too much time in Germany .
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:49 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC