[ale] Assembly Language?

Michael B. Trausch mbt at naunetcorp.com
Wed Oct 23 17:26:59 EDT 2013


On 10/23/2013 04:33 PM, Ron Frazier (ALE) wrote:
> Have any of you worked with Intel x86 32 bit assembly on Linux?  How about 64 bit?

Yes, both.  It is non-trivial to learn compared to the 6502, which I've 
also programmed, or other (modern) µcontrollers such as the various AVR 
lines.

> Is anyone familiar with HLA, or High Level Assembly, which uses macros (I think) to support constructs like if/then, while, etc?  This is in a book I may buy.

Macro assembly is common in free software assemblers.  You may want to 
use NASM (32-bit) or WASM (NWASM?) which is a fork that also handles 
AMD64/EM64T.  Also, if you're going to do any long-mode programming, you 
need to be aware of the differences between AMD64 and EM64T.

Before proceeding at all I would recommend reading Intel's or AMD's 
complete documentation.  Not a light reading task; you're talking about 
several very large volumes.  Volumes I and II of either set are essential.

> What would be necessary to use assembly in Linux (Mint / Ubuntu)?  What about HLA?

I wouldn't use an assembler that doesn't permit for macros, period. 
Which assembler you use will depend on what you do; if you're writing 
standalone binary blobs you'll use NASM or similar, if you're 
integrating with or optimizing C code that is compiled with gcc then 
you're going to use gas or similar.  If you're using clang, then you'll 
want to use NASM or similar and compile to distinct object files, then 
link them together.

> Can you even truly run assembly on a modern OS?  IE, can you even get access to the registers, etc?

Yes, but you must comply with the calling conventions and other 
requirements not only imposed by the platform, but the compiler you're 
using (yes, the rules change based on the compiler you use as well as 
the OS).

     --- Mike

-- 

	Michael B. Trausch

President, *Naunet Corporation*
? (678) 287-0693 x130 or (855) NAUNET-1 x130
FAX: (678) 783-7843

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20131023/18c4de10/attachment.html>


More information about the Ale mailing list