•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Software Development category of DaniWeb, a massive community of 428,212 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,244 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Software Development advertiser: Programming Forums
Nov 7th, 2007, 11:12 pm
Taking the "fright" out of Opcodes and Hex-numbers.
High Level Assembly (HLA) is a modern assembler + standard library package that allows a programmer to ease his way toward ASM coding by leveraging concepts already learned from typical high-level languages. By using HLA, one can investigate and play with a few ASM instructions at a time while coding the remainder of the application using built-in functions and flow-control constructs that one should already be accustomed to. As one gains confidence with traditional assembly coding, they can begin to eliminate the high-level parts of the application by re-coding them in straight ASM.
Here is an example to demonstrate how an HLA application looks very close to how one might write the same program in C or other traditional language.
Get HLA and the *free* online version of "Art of Assembly" here: http://www.artofasm.com
Get an IDE specifically for HLA (Windows only) here: http://sevag.krikorian.googlepages.com/
High Level Assembly (HLA) is a modern assembler + standard library package that allows a programmer to ease his way toward ASM coding by leveraging concepts already learned from typical high-level languages. By using HLA, one can investigate and play with a few ASM instructions at a time while coding the remainder of the application using built-in functions and flow-control constructs that one should already be accustomed to. As one gains confidence with traditional assembly coding, they can begin to eliminate the high-level parts of the application by re-coding them in straight ASM.
Here is an example to demonstrate how an HLA application looks very close to how one might write the same program in C or other traditional language.
// cross-platform: Linux & Windows now; others in the works...
// get HLA here: http://www.artofasm.com
program demo;
#include( "stdlib.hhf" )
const
ITERATIONS :uns32 := 10000;
MAX_VALUE :uns32 := 100;
static
items :uns32[ITERATIONS];
freq :uns32[MAX_VALUE+1];
mixed :file;
sorted :file;
begin demo;
/* initialization
*/
rand.randomize();
mixed.create(); // these are file objects
mixed.openNew( "sfalse.txt" );
sorted.create();
sorted.openNew( "strue.txt" );
/* create the unsorted array
*/
mov( 0, ecx );
repeat
rand.range( 0, MAX_VALUE ); // returns value in 'eax'
mov( eax, items[ecx*4] ); // puts value into array
mixed.put( (type uns32 ecx):5, ": ", (type uns32 eax), nl );
// mirror to file
add( 1, ecx );
until ( ecx = ITERATIONS );
/* record the frequencies of the numbers
*/
for( mov( 0, ecx ); ecx < ITERATIONS; inc( ecx ) ) do
mov( items[ecx*4], eax ); // get value from array
inc( freq[eax*4] ); // increment its frequency count
endfor;
/* use frequency table to re-order the array
*/
xor( ecx, ecx ); // could also use 'mov( 0, ecx )'
xor( ebx, ebx );
while( ebx < MAX_VALUE+1 ) do
mov( freq[ebx*4], eax ); // get frequency count
if ( eax != 0 ) then
// keep storing that number until eax = 0
repeat
mov( ebx, items[ecx*4] );
sorted.put( (type uns32 ecx):5, ": ", (type uns32 ebx), nl );
// mirror to file
inc( ecx ); // could also use 'add( 1, ecx )'
dec( eax ); // sets Zero Flag if eax = 0
until ( @z ); // check if Zero Flag is set
endif;
add( 1, ebx );
endwhile;
mixed.close();
sorted.close();
end demo;Get HLA and the *free* online version of "Art of Assembly" here: http://www.artofasm.com
Get an IDE specifically for HLA (Windows only) here: http://sevag.krikorian.googlepages.com/
This blog entry was written by Evenbit. It has received 1,702 views, 3 comments, and 3 linkbacks.
Comments (Newest First)
Evenbit | Junior Poster in Training | Nov 27th, 2007
felmanmark | Newbie Poster | Nov 25th, 2007
•
•
•
•
Hi im new in java can you pls give me for the code in determing the lowest and highest number in the series of array and asking the user of number and dirrference of the highest and the lowest because i have not any references here because im just living at the dormitory.
Thanks
Thanks
felmanmark | Newbie Poster | Nov 25th, 2007
•
•
•
•
HI,
Im an computer science student i must research for the commands used in assembly can anybody give me copy in table form.. The command and its used..
Thank you for thise who reply
Im an computer science student i must research for the commands used in assembly can anybody give me copy in table form.. The command and its used..
Thank you for thise who reply
Post Comment
•
•
•
•
Only community members can start a blog or comment on blog entries. You must register or log in to contribute.
•
•
•
•
•
•
•
•
DaniWeb Software Development Marketplace
Related Blog Entries
- Thunder Tables Kill Microsoft 40-bit Encryption (2 Days Ago)
- CMG: Free Performance Data and White Papers (4 Days Ago)
- The six million dollar World of Warcraft bot (12 Days Ago)
- Flash May Soon Brighten the iPhone (13 Days Ago)
- Q and A with Electric Cloud CEO Mike Maciag (15 Days Ago)
- Apple Updates Its Java VM (16 Days Ago)
- Why did Apple take 5 months to fix 24 security holes in OS X Java? (17 Days Ago)
- 'Preflight' Your Builds for More Continuous Integration (26 Days Ago)
- VMware: REAL Write Once, Run Anywhere (27 Days Ago)
- Zend to Link its PHP Tools With Adobe Flex, Dojo (27 Days Ago)
Related Forum Threads
- Is there a portable assembly language? (Assembly)
- Where can i learn about assembly language (Assembly)
- OOPic Microcontroller - Assembly Language Programming (Assembly)
- Using Assembly Language in .NET? (ASP.NET)
- Introduction to 80 x 86 Assembly Language and Computer Architecture - no CD - help (Assembly)
- machine/assembly language, syntax error (C++)
Intel --
http://www.sandpile.org/docs/intel/ia-32.htm
AMD --
http://www.sandpile.org/docs/amd/k6.htm