242 lines
9.3 KiB
HTML
242 lines
9.3 KiB
HTML
<!--startcut ======================================================= -->
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<html>
|
|
<head>
|
|
<META NAME="generator" CONTENT="lgazmail v1.2M.j">
|
|
<TITLE>The Answer Guy 44: Assembly Language Programming for an old DESQview User</TITLE>
|
|
</HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000"
|
|
LINK="#3366FF" VLINK="#A000A0">
|
|
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
<H4>"The Linux Gazette...<I>making Linux just a little more fun!</I>"</H4>
|
|
<P> <hr> <P>
|
|
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
<center>
|
|
<H1><A NAME="answer">
|
|
<img src="../../gx/dennis/qbubble.gif" alt="(?)"
|
|
border="0" align="middle">
|
|
<font color="#B03060">The Answer Guy</font>
|
|
<img src="../../gx/dennis/bbubble.gif" alt="(!)"
|
|
border="0" align="middle">
|
|
</A></H1>
|
|
<BR>
|
|
<H4>By James T. Dennis,
|
|
<a href="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</a><BR>
|
|
LinuxCare,
|
|
<A HREF="http://www.linuxcare.com/">http://www.linuxcare.com/</A>
|
|
</H4>
|
|
</center>
|
|
|
|
<p><hr><p>
|
|
<!-- endcut ======================================================= -->
|
|
<!-- begin 24 -->
|
|
<H3 align="left"><img src="../../gx/dennis/qbubble.gif"
|
|
height="50" width="60" alt="(?) " border="0"
|
|
>Assembly Language Programming for an old DESQview User</H3>
|
|
|
|
|
|
<p><strong>From Ed Damvelt on Mon, 19 Jul 1999
|
|
</strong></p>
|
|
<!-- ::
|
|
Assembly Language Programming for an old DESQview User
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
:: -->
|
|
<P><STRONG>
|
|
Good evening.
|
|
</STRONG></P>
|
|
<P><STRONG>
|
|
I saw your answer to a question regarding Desqview386 and your
|
|
recommendation of Linux.
|
|
</STRONG></P>
|
|
<P><STRONG>
|
|
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.
|
|
</STRONG></P>
|
|
<P><STRONG>
|
|
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.
|
|
</STRONG></P>
|
|
<P><STRONG>
|
|
I really would appreciate getting some pointers to search variables from
|
|
you.
|
|
</STRONG></P>
|
|
<P><STRONG>
|
|
Regs,
|
|
Ed Damvelt.
|
|
</STRONG></P>
|
|
<BLOCKQUOTE><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
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.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
I'm not an assembly programmer per se, though I have
|
|
played with Z-80, 6502, and 8086 assemply.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
Your best resources for ASM programming under Linux
|
|
seem to be:
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE><DL><DT>
|
|
Assembly HOWTO
|
|
<DD><A HREF="http://metalab.unc.edu/LDP/HOWTO/Assembly-HOWTO.html"
|
|
>http://metalab.unc.edu/LDP/HOWTO/Assembly-HOWTO.html</A>
|
|
</DL></BLOCKQUOTE>
|
|
<BLOCKQUOTE><DL><DT>
|
|
NASM - The Netwide Assembler Project - FREE 80x86 assembler
|
|
<DD><A HREF="http://www.web-sites.co.uk/nasm"
|
|
>http://www.web-sites.co.uk/nasm</A>
|
|
</DL></BLOCKQUOTE>
|
|
<BLOCKQUOTE><DL><DT>
|
|
asmutils: Linux/i386 assembly programming page
|
|
<DD><A HREF="http://lightning.voshod.com/asm"
|
|
>http://lightning.voshod.com/asm</A>
|
|
</DL></BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
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).
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
(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).
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
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.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
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) (<A HREF="http://www.toms.net/rb"
|
|
>http://www.toms.net/rb</A>) and to
|
|
the people who work on embedded Linux systems (who have a
|
|
mailing list and an FAQ at <A HREF="http://www.waste.org/~zanshin"
|
|
>http://www.waste.org/~zanshin</A>).
|
|
(I've copied some of them on this message).
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
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.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
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.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
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.
|
|
</BLOCKQUOTE>
|
|
<!-- sig -->
|
|
|
|
<!-- end 24 -->
|
|
<!--startcut ======================================================= -->
|
|
<P> <hr> <P>
|
|
<H5 align="center"><a href="http://www.linuxgazette.com/copying.html"
|
|
>Copyright ©</a> 1999, James T. Dennis
|
|
<BR>Published in <I>The Linux Gazette</I> Issue 44 August 1999</H5>
|
|
<H6 ALIGN="center">HTML transformation by
|
|
<A HREF="mailto:star@starshine.org">Heather Stern</a> of
|
|
Starshine Techinical Services,
|
|
<A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
|
|
</H6>
|
|
<P> <hr> <P>
|
|
<!-- begin tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::-->
|
|
<TABLE WIDTH="98%"><TR VALIGN="center" ALIGN="center">
|
|
<TD ROWSPAN="2" COLSPAN="3" WIDTH="42%"><A
|
|
HREF="../lg_answer44.html"
|
|
><IMG SRC="../../gx/dennis/answernew.gif"
|
|
ALT="[ Answer Guy Index ]"></A></td>
|
|
<TD WIDTH="14%"><A HREF="1.html">1</A></TD>
|
|
<TD WIDTH="14%"><A HREF="4.html">4</A></TD>
|
|
<TD WIDTH="14%"><A HREF="7.html">7</A></TD>
|
|
<TD WIDTH="14%"><A HREF="9.html">9</A></TD>
|
|
</TR><TR VALIGN="center" ALIGN="center">
|
|
<TD WIDTH="14%"><A HREF="11.html">11</A></TD>
|
|
<TD WIDTH="14%"><A HREF="12.html">12</A></TD>
|
|
<TD WIDTH="14%"><A HREF="14.html">14</A></TD>
|
|
<TD WIDTH="14%"><A HREF="17.html">17</A></TD>
|
|
</TR><TR VALIGN="center" ALIGN="center">
|
|
<TD><A HREF="18.html">18</A></TD>
|
|
<TD><A HREF="19.html">19</A></TD>
|
|
<TD><A HREF="20.html">20</A></TD>
|
|
<TD><A HREF="21.html">21</A></TD>
|
|
<TD><A HREF="24.html">24</A></TD>
|
|
<TD><A HREF="25.html">25</A></TD>
|
|
<TD><A HREF="26.html">26</A></TD>
|
|
</TR><TR VALIGN="center" ALIGN="center">
|
|
<TD><A HREF="28.html">28</A></TD>
|
|
<TD><A HREF="29.html">29</A></TD>
|
|
<TD><A HREF="30.html">30</A></TD>
|
|
<TD><A HREF="31.html">31</A></TD>
|
|
<TD><A HREF="32.html">32</A></TD>
|
|
<TD><A HREF="33.html">33</A></TD>
|
|
<TD><A HREF="34.html">34</A></TD>
|
|
</TR><TR VALIGN="center" ALIGN="center">
|
|
<TD><A HREF="35.html">35</A></TD>
|
|
<TD><A HREF="36.html">36</A></TD>
|
|
<TD><A HREF="37.html">37</A></TD>
|
|
<TD><A HREF="38.html">38</A></TD>
|
|
<TD><A HREF="39.html">39</A></TD>
|
|
<TD><A HREF="40.html">40</A></TD>
|
|
<TD><A HREF="41.html">41</A></TD>
|
|
</TR><TR VALIGN="center" ALIGN="center">
|
|
<TD><A HREF="42.html">42</A></TD>
|
|
<TD><A HREF="43.html">43</A></TD>
|
|
<TD><A HREF="44.html">44</A></TD>
|
|
<TD><A HREF="45.html">45</A></TD>
|
|
<TD><A HREF="46.html">46</A></TD>
|
|
<TD><A HREF="47.html">47</A></TD>
|
|
<TD><A HREF="48.html">48</A></TD>
|
|
</TR></TABLE>
|
|
<!-- end tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::::-->
|
|
<P> <hr> <P>
|
|
<!-- begin lgnav ::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
<A HREF="../index.html"
|
|
><IMG SRC="../../gx/indexnew.gif" ALT="[ Table Of Contents ]"></A>
|
|
<A HREF="/index.html"
|
|
><IMG SRC="../../gx/homenew.gif" ALT="[ Front Page ]"></A>
|
|
<A HREF="../lg_bytes44.html"
|
|
><IMG SRC="../../gx/back2.gif" ALT="[ Previous Section ]"></A>
|
|
<A HREF="../lg_tips44.html"
|
|
><IMG SRC="../../gx/fwd.gif" ALT="[ Next Section ]"></A>
|
|
<!-- end lgnav ::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
</BODY></HTML>
|
|
<!--endcut ========================================================= -->
|