diff --git a/LDP/howto/docbook/Assembly-HOWTO.xml b/LDP/howto/docbook/Assembly-HOWTO.xml index a5691fbf..0bf20be9 100644 --- a/LDP/howto/docbook/Assembly-HOWTO.xml +++ b/LDP/howto/docbook/Assembly-HOWTO.xml @@ -20,7 +20,7 @@ -Linux Assembly +Linux Assembly
lnoor@users.sourceforge.net @@ -36,7 +36,7 @@ -Linux Assembly +Linux Assembly
konst@users.sourceforge.net @@ -52,7 +52,7 @@ -Tunes project +Tunes project
fare@tunes.org @@ -149,16 +149,16 @@ read all this assembly-unrelated crap. Legal Blurb Permission is granted to copy, distribute and/or modify this document under the -terms of the GNU Free -Documentation License Version 1.1; with no Invariant Sections, with no +terms of the GNU Free +Documentation License Version 1.1; with no Invariant Sections, with no Front-Cover Texts, and no Back-Cover texts. A copy of the license is included in the appendix. The most recent official version of this document is available from the -Linux Assembly -and LDP sites. If you are +Linux Assembly +and LDP sites. If you are reading a few-months-old copy, consider checking the above URLs for a new version. @@ -186,15 +186,15 @@ issue), we are focusing on development of such kind of software. -If you don't know what -free software is, please do read +If you don't know what +free software is, please do read carefully the GNU - -General Public License (GPL or + +General Public License (GPL or copyleft), which is used in a lot of free software, and is the model for most of their licenses. It generally comes in a file named COPYING (or COPYING.LIB). Literature -from the Free Software Foundation +from the Free Software Foundation (FSF) might help you too. Particularly, the interesting feature of free software is that it comes with source code which you can consult and correct, or sometimes even borrow from. Read your particular @@ -229,11 +229,11 @@ version 0.5). Translations Korean translation of this HOWTO is avalilable at - -http://kldp.org/HOWTO/html/Assembly-HOWTO/. + +http://kldp.org/HOWTO/html/Assembly-HOWTO/. Turkish translation of this HOWTO is available at - -http://belgeler.org/howto/assembly-howto.html. + +http://belgeler.org/howto/assembly-howto.html. @@ -405,7 +405,7 @@ good); And in any case, as moderator John Levine says on -comp.compilers, +comp.compilers, @@ -491,7 +491,7 @@ written in assembly for speed up.
General procedure to achieve efficient code -As Charles Fiterman says on comp.compilers +As Charles Fiterman says on comp.compilers about human vs computer-generated assembly code: @@ -689,19 +689,19 @@ available platforms, notably Linux, *BSD, VSTa, OS/2, *DOS, Win*, etc.
Where to find GCC -GCC home page is http://gcc.gnu.org. +GCC home page is http://gcc.gnu.org. DOS port of GCC is called -DJGPP. +DJGPP. There are two Win32 GCC ports: -cygwin and -mingw +cygwin and +mingw @@ -709,8 +709,8 @@ There is also an OS/2 port of GCC called EMX; it works under DOS too, and includes lots of unix-emulation library routines. Look around the following site: - -ftp://ftp.leo.org/pub/comp/os/os2/leo/gnu/emx+gcc/. + +ftp://ftp.leo.org/pub/comp/os/os2/leo/gnu/emx+gcc/.
@@ -752,8 +752,8 @@ The DJGPP Games resource (not only for game hackers) had page specifically about assembly, but it's down. Its data have nonetheless been recovered on the DJGPP site, that contains a mine of other useful information: - -http://www.delorie.com/djgpp/doc/brennan/. + +http://www.delorie.com/djgpp/doc/brennan/. @@ -826,7 +826,7 @@ obvious stupid errors. You can add some CPU-specific or such flag so that GCC will produce code that is more adapted to your precise CPU. Note that modern GCC has and such flags (and -PGCC has even more), whereas +PGCC has even more), whereas GCC 2.7.x and older versions do not. A good choice of CPU-specific flags should be in the Linux kernel. Check the TeXinfo documentation of your current GCC installation for more. @@ -907,8 +907,8 @@ GAS is the GNU Assembler, that GCC relies upon. Find it at the same place where you've found GCC, in the binutils package. The latest version of binutils is available from - -http://sources.redhat.com/binutils/. + +http://sources.redhat.com/binutils/.
@@ -1014,9 +1014,9 @@ see under linux/arch/i386/ the following files: If you are writing kind of a language, a thread package, etc., you might as -well see how other languages ( -OCaml, -Gforth, etc.), or thread packages (QuickThreads, MIT pthreads, +well see how other languages ( +OCaml, +Gforth, etc.), or thread packages (QuickThreads, MIT pthreads, LinuxThreads, etc), or whatever else do it. @@ -1035,8 +1035,8 @@ Good news are that starting from binutils 2.10 release, GAS supports Intel syntax too. It can be triggered with .intel_syntax directive. Unfortunately this mode is not documented (yet?) in the official binutils manual, so if you want to use it, try to examine - -http://www.lxhp.in-berlin.de/lhpas86.html, which is an extract from AMD + +http://www.lxhp.in-berlin.de/lhpas86.html, which is an extract from AMD 64bit port of binutils 2.11.
@@ -1094,9 +1094,9 @@ formats. Where to find NASM -http://www.nasm.us, - -http://sourceforge.net/projects/nasm/ +http://www.nasm.us, + +http://sourceforge.net/projects/nasm/ @@ -1182,8 +1182,8 @@ ELKS continues to use it. AS86 can be found at - -http://www.debath.co.uk/dev86/, in the bin86 package with linker (ld86), + +http://www.debath.co.uk/dev86/, in the bin86 package with linker (ld86), or as separate archive. Documentation is available as the man page and as.doc from the source package. When in doubt, the source code itself is often a good doc: though it is not very well commented, the programming style is @@ -1242,7 +1242,7 @@ FASM (flat assembler) is a fast, efficient 80x86 assembler that runs in source code to include the information it really needs. It is written in itself and is very small and fast. It runs on DOS/Windows/Linux and can produce flat binary, DOS EXE, Win32 PE, COFF and Linux ELF output. See -http://flatassembler.net. +http://flatassembler.net. @@ -1259,8 +1259,8 @@ and has various HLL-like extensions and programmer convenience commands. It is (of course) slower than other assemblers. It has its own syntax (and uses its own names for x86 opcodes) Fairly good documentation is included. Check it -out: -ftp://linux01.gwdg.de/pub/cLIeNUX/interim/ (Access is password +out: +ftp://linux01.gwdg.de/pub/cLIeNUX/interim/ (Access is password controlled). You will probably not use it on regular basis, but at least it deserves your interest as an interesting idea. @@ -1293,8 +1293,8 @@ formats. - -http://savannah.nongnu.org/projects/aasm/ + +http://savannah.nongnu.org/projects/aasm/ @@ -1309,8 +1309,8 @@ compilation process. -It is available from -http://www.penguin.cz/~niki/tdasm/ but is seems it is no longer +It is available from +http://www.penguin.cz/~niki/tdasm/ but is seems it is no longer actively maintained. @@ -1319,8 +1319,8 @@ actively maintained. HLA - -HLA is a High Level + +HLA is a High Level Assembly language. It uses a high level language like syntax (similar to Pascal, C/C++, and other HLLs) for variable declarations, procedure declarations, and procedure calls. It uses a modified assembly @@ -1341,7 +1341,7 @@ assembling and linking. TALC -TALC is another free +TALC is another free MASM/Win32 based compiler (however it supports ELF output, does it?). @@ -1365,7 +1365,7 @@ extensible operating system kernels. Free Pascal -Free Pascal has an internal +Free Pascal has an internal 32-bit assembler (based on NASM tables) and a switchable output that allows: @@ -1427,8 +1427,8 @@ FORTH language. Macro processing is done with the full power of the reflective language FORTH; however, the only supported input and output contexts is Win32For itself (no dumping of .obj file, but you could add that feature yourself, of course). Find it at - -ftp://ftp.forth.org/pub/Forth/Compilers/native/windows/Win32For/. + +ftp://ftp.forth.org/pub/Forth/Compilers/native/windows/Win32For/. @@ -1436,7 +1436,7 @@ ftp://ftp.forth.org/pub/Forth/Compilers/native/windows/Win32For/. Terse -Terse is a programming tool that +Terse is a programming tool that provides THE most compact assembler syntax for the x86 family! However, it is evil proprietary software. It is said that there was a project for a free clone somewhere, that was abandoned after worthless pretenses @@ -1447,7 +1447,7 @@ develop a terse-syntax frontend to NASM, if you like that syntax. As an interesting historic remark, on -comp.compilers, +comp.compilers, @@ -1561,8 +1561,8 @@ that CPP cannot. See - -macro4th (this4th) as an example of advanced macroprogramming using m4. + +macro4th (this4th) as an example of advanced macroprogramming using m4. @@ -1680,8 +1680,8 @@ There is a project, using the programming language Icon (with an experimental ML version), to build a basis for producing assembly-manipulating code. See around - -http://www.eecs.harvard.edu/~nr/toolkit/ + +http://www.eecs.harvard.edu/~nr/toolkit/ @@ -1689,7 +1689,7 @@ http://www.eecs.harvard.edu/~nr/toolkit/ TUNES -The TUNES Project +The TUNES Project for a Free Reflective Computing System is developing its own assembler as an extension to the Scheme language, as part of its development process. It doesn't run at all yet, though help is welcome. @@ -1926,10 +1926,10 @@ Therefore, you might have to reimplement large parts of libc, from can be quite boring sometimes. Note that some people have already reimplemented "light" replacements for parts of the libc - - check them out! (Redhat's minilibc, Rick Hohensee's -libsys, -Felix von Leitner's dietlibc, - -asmutils +libsys, +Felix von Leitner's dietlibc, + +asmutils project is working on pure assembly libc) @@ -2034,9 +2034,9 @@ previous Linux versions understand only 5 parameters in registers. -Linux Kernel Internals, -and especially -How System Calls Are Implemented on i386 Architecture? chapter will give +Linux Kernel Internals, +and especially +How System Calls Are Implemented on i386 Architecture? chapter will give you more robust overview. @@ -2068,8 +2068,8 @@ and documents from the LDP. Particularly, if what you want is Graphics programming, then do join one of the -GGI or -XFree86 projects. +GGI or +XFree86 projects. @@ -2092,7 +2092,7 @@ assembly source files. Such thing is theoretically possible (proof: see how -DOSEMU can selectively grant +DOSEMU can selectively grant hardware port access to programs), and I've heard rumors that someone somewhere did actually do it (in the PCI driver? Some VESA access stuff? ISA PnP? dunno). If you have some more precise information on that, you'll be most welcome. @@ -2165,8 +2165,8 @@ reflect the interrupt into the real-mode or vm86 handler). Docs about DPMI (and much more) can be found on - -http://en.wikipedia.org/wiki/DOS_Protected_Mode_Interface). + +http://en.wikipedia.org/wiki/DOS_Protected_Mode_Interface). @@ -2178,7 +2178,7 @@ derivative/subset/replacement, too. It is possible to cross-compile from Linux to DOS, see the devel/msdos/ directory of your local FTP mirror for metalab.unc.edu; Also see the MOSS DOS-extender from the -Flux project +Flux project from the university of Utah. @@ -2192,7 +2192,7 @@ development. This document is not about Windows programming, you can find lots of documents about it everywhere... The thing you should know is that there is the -cygwin32.dll library, +cygwin32.dll library, for GNU programs to run on Win32 platform; thus, you can use GCC, GAS, all the GNU tools, and many other Unix applications. @@ -2213,7 +2213,7 @@ an underlying system (much like Linux over Mach or OpenGenera over Unix). Hence, for easier debugging purpose, you might like to develop your "OS" first as a process running on top of Linux (despite the slowness), then use the -Flux OS kit +Flux OS kit (which grants use of Linux and BSD drivers in your own OS) to make it stand-alone. When your OS is stable, it is time to write your own hardware drivers if you really love that. @@ -2228,8 +2228,8 @@ braindeadness, defining your object format and calling conventions. The main place where to find reliable information about that all, is source code of existing OSes and bootloaders. Lots of pointers are on the following -webpage: -http://www.tunes.org/Review/OSes.html +webpage: +http://www.tunes.org/Review/OSes.html @@ -2261,8 +2261,8 @@ and gas, thus showing Intel and AT&T syntax. You may also want to read - -Introduction to UNIX assembly programming tutorial, it contains sample + +Introduction to UNIX assembly programming tutorial, it contains sample code for other UNIX-like OSes. @@ -2525,8 +2525,8 @@ Your main resource for Linux/UNIX assembly programming material is:
- -http://asm.sourceforge.net/resources.html + +http://asm.sourceforge.net/resources.html
@@ -2544,7 +2544,7 @@ If you are new to assembly in general, here are few starting pointers: -Programming from the ground up +Programming from the ground up @@ -2556,7 +2556,7 @@ x86 assembly FAQ (use Google) -CoreWars, +CoreWars, a fun way to learn assembly in general @@ -2564,8 +2564,8 @@ a fun way to learn assembly in general Usenet: -comp.lang.asm.x86; -alt.lang.asm +comp.lang.asm.x86; +alt.lang.asm @@ -2602,8 +2602,8 @@ subscribe linux-assembly Detailed information and list archives are available at - -http://asm.sourceforge.net/list.html. + +http://asm.sourceforge.net/list.html. @@ -2630,7 +2630,7 @@ How do I do graphics programming in Linux? -An answer from Paul Furber: +An answer from Paul Furber: @@ -2698,7 +2698,7 @@ How do I debug pure assembly code under Linux? There's an early version of the -Assembly Language Debugger, +Assembly Language Debugger, which is designed to work with assembly code, and is portable enough to run on Linux and *BSD. It is already functional and should be the right choice, check it out! @@ -2711,7 +2711,7 @@ pure assembly code, and with some trickery you can make gdb to do what you need (unfortunately, nasm '-g' switch does not generate proper debug info for gdb; this is nasm bug, I think). -Here's an answer from Dmitry Bakhvalov: +Here's an answer from Dmitry Bakhvalov: @@ -2767,7 +2767,7 @@ If you want to set breakpoints across your code, you can just use If you're using gas, you should consult gas and gdb related -tutorials. +tutorials. @@ -2897,7 +2897,7 @@ How do I allocate memory dynamically? -A laconic answer from H-Peter Recktenwald: +A laconic answer from H-Peter Recktenwald: @@ -2915,7 +2915,7 @@ A laconic answer from H-Peter Recktenwal -An extensive answer from Tiago Gasiba: +An extensive answer from Tiago Gasiba: @@ -2983,7 +2983,7 @@ I can't understand how to use select system call! -An answer from Patrick Mochel: +An answer from Patrick Mochel: @@ -3544,7 +3544,7 @@ the following persons, by order of appearance: -Linus Torvalds +Linus Torvalds for Linux @@ -3552,37 +3552,37 @@ for Linux -Bruce Evans +Bruce Evans for bcc from which as86 is extracted -Simon Tatham and -Julian Hall +Simon Tatham and +Julian Hall for NASM -Greg Hankins and now -Tim Bynum +Greg Hankins and now +Tim Bynum for maintaining HOWTOs -Raymond Moon +Raymond Moon for his FAQ -Eric Dumas +Eric Dumas for his translation of the mini-HOWTO into French (sad thing for the original author to be French and write in English) @@ -3590,22 +3590,22 @@ for his translation of the mini-HOWTO into French -Paul Anderson and -Rahim Azizarab +Paul Anderson and +Rahim Azizarab for helping me, if not for taking over the HOWTO -Marc Lehman +Marc Lehman for his insight on GCC invocation -Abhijit Menon-Sen +Abhijit Menon-Sen for helping me figure out the argument passing convention @@ -4025,8 +4025,8 @@ Version 1.1, March 2000 versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or - concerns. See - http://www.gnu.org/copyleft/. + concerns. See + http://www.gnu.org/copyleft/. Each version of the License is given a distinguishing version number. If the Document specifies that a particular