"The Linux Gazette...making Linux just a little more fun!"


(?) The Answer Guy (!)


By James T. Dennis, linux-questions-only@ssc.com
LinuxCare, http://www.linuxcare.com/


(?) Assembly Language Programming for an old DESQview User

From Ed Damvelt on Mon, 19 Jul 1999

Good evening.

I saw your answer to a question regarding Desqview386 and your recommendation of Linux.

From 1985 until eight years ago, when I moved from Europe to Mexico, I made industrial automation programs (assembler for all routines and MS-C just to compile it, because my data base/index file software is in C) and complete hardware, running, if necessary, under Desqview386. Since I am here I have not been active in this field, so I lost a bit the thread.

Nevertheless, recently I started engineering in automation again, and want my programs to run in ASM again. I thus need a multitasking environment and Linux seems to be the proper choice nowadays; I am one of the Windows-haters, but forced to use it still. For me the questions now are: What conventions must the assembler file answer to in order to run under Linux? Search as I did, I only found info about how to run existing programs, not how to program myself. Can you tell me where to find this info? Are there ASM- and C-compilers to have for Linux? Yes, where? What is there to do to run multiple programs? Etc. I guess you got the gist of my needs. I do hope that I do not have to re-write my whole ASM-library; it cost me a lot of time to write identical procedures to MS-C and, where convenient, Turbo-Pascal in such way, that they are much more efficient, practically insensitive to type/pointer mix-up and much faster.

I really would appreciate getting some pointers to search variables from you.

Regs, Ed Damvelt.

(!) Well, assembly language programming is rare in any form of UNIX. However, it is somewhat better supported under Linux than under most other UNIX variants.
I'm not an assembly programmer per se, though I have played with Z-80, 6502, and 8086 assemply.
Your best resources for ASM programming under Linux seem to be:
Assembly HOWTO
http://metalab.unc.edu/LDP/HOWTO/Assembly-HOWTO.html
NASM - The Netwide Assembler Project - FREE 80x86 assembler
http://www.web-sites.co.uk/nasm
asmutils: Linux/i386 assembly programming page
http://lightning.voshod.com/asm
This last link in particular leads to a small package called 'asmutils' --- which includes straight assembly language replacements for about thirty small UNIX utilities. There's even a 757 byte web server. (That was not a typo: seven HUNDRED and fifty odd BYTES!). All of the others are smaller. Most of the others are under half that size. (And those are STATIC BINARIES --- with no dependencies on any shared libraries).
(That's pretty interesting in that "Hello World" compiled statically under glibc 2.x comes in at 90K (kilobytes). The assembly language version I cooked up in five minutes using one of the asmutils programs as a template assembled into about 90 bytes).
So, you and Konstantin Boldyshev (the author of asmutils) might have quite a bit of fun creating a large suite of raw assembly language tools for Linux.
These will probably be of particular interest to people like Tom Oehser (maintainer of Tom's Root/Boot, "The most Linux you can fit on a Floppy) (http://www.toms.net/rb) and to the people who work on embedded Linux systems (who have a mailing list and an FAQ at http://www.waste.org/~zanshin). (I've copied some of them on this message).
In addition to pointing them at these resources (of which they were probably already aware) this will give them an opportunity to comment on what I've said and expand the content (or make corrections). You might want to join The embedded Linux mailing list (as their interests are similar, though quite a bit of their work is down in C, too) and possibly in participating in the Tom's Root/Boot mailing list or in the asmutils and Lightning Project.
Together the micro-Linux (very small distributions like Toms, LRP, ODL, Trinux, LOAF, etc) embedded, and assembly language projects form a interesting niche within the Linux community.
Linus has said that the most interesting things happening in the future of Linux will be on the desktop and in the embedded realms. I agree.


Copyright © 1999, James T. Dennis
Published in The Linux Gazette Issue 44 August 1999
HTML transformation by Heather Stern of Starshine Techinical Services, http://www.starshine.org/


[ Answer Guy Index ] 1 4 7 9
11 12 14 17
18 19 20 21 24 25 26
28 29 30 31 32 33 34
35 36 37 38 39 40 41
42 43 44 45 46 47 48


[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Next Section ]