This commit is contained in:
gferg 2000-10-23 15:46:39 +00:00
parent 9bf30a5e70
commit a58d122bc5
3 changed files with 588 additions and 204 deletions

View File

@ -16,7 +16,7 @@
<url url="mailto:konst@linuxassembly.org" name="Konstantin Boldyshev"> and
<url url="mailto:fare@tunes.org" name="Francois-Rene Rideau">
<date>v0.5l, August 23, 2000
<date>v0.5m, October 22, 2000
<abstract>
This is the Linux Assembly HOWTO.
@ -161,6 +161,11 @@ I would like to thank following persons, by order of appearance:
Each version includes a few fixes and minor corrections,
that need not to be repeatedly mentioned every time.
<descrip>
<tag/Version 0.5m 22 Oct 2000/
Linux 2.4 system calls can have 6 args,
Added ALD note to FAQ,
fixed mailing list subscribe address
<tag/Version 0.5l 23 Aug 2000/
Added TDASM, updates on NASM
@ -809,9 +814,11 @@ from the cell pointed to by <tt/&percnt;ebp/).
A program exists to help you convert programs
from TASM syntax to AT&amp;T syntax. See
<url url="ftp://x2ftp.oulu.fi/pub/msdos/programming/convert/ta2asv08.zip">.
(Since the original x2ftp site is closing (no more?), use a
<!--
(Since the original x2ftp site is closing (no more?), use a
<url url="ftp://ftp.lip6.fr/pub/pc/x2ftp/README.mirror_sites"
name="mirror site">).
-->
There also exists a program for the reverse conversion:
<url url="http://www.multimania.com/placr/a2i.html">.
@ -1561,13 +1568,20 @@ examine <ref id="res" name="Linux Assembly resources">.
Basically, you issue an <tt/int 0x80/,
with the <tt/&lowbar;&lowbar;NR&lowbar;/syscallname number
(from <tt>asm/unistd.h</tt>)
in <tt/eax/, and parameters (up to five) in
<tt/ebx, ecx, edx, esi, edi/ respectively.
in <tt/eax/, and parameters (up to six [*]) in
<tt/ebx, ecx, edx, esi, edi, ebp [*]/ respectively ([*] - Linux 2.4 only,
previous versions have only 5 parameters).
Result is returned in <tt/eax/, with a negative result being an error,
whose opposite is what libc would put in <tt/errno/.
The user-stack is not touched,
so you needn't have a valid one when doing a syscall.
<url url="http://www.linuxdoc.org/LDP/lki/" name="Linux Kernel Internals">,
and especially
<url url="http://www.linuxdoc.org/LDP/lki/Linux-Kernel-Internals-2.html#ss2.11"
name="How System Calls Are Implemented on i386 Architecture?">
chapter will give you more robust overview.
As for the invocation arguments passed to a process upon startup,
the general principle is that the stack
originally contains the number of arguments <tt/argc/,
@ -1897,17 +1911,16 @@ If you're are interested in Linux/UNIX assembly programming
(or have questions, or are just curious)
I especially invite you to join Linux assembly programming mailing list.
This is an open discussion of assembly programming under Linux, FreeBSD, BeOS,
This is an open discussion of assembly programming under Linux, *BSD, BeOS,
or any other UNIX/POSIX like OS; also it is not limited to x86 assembly
(Alpha, Sparc, PPC and other hackers are welcome too!).
To subscribe send a blank message to <url url="mailto:linux-assembly-subscribe@egroups.com">.
List address is <url url="mailto:linux-assembly@egroups.com">.
To subscribe send a blank message to <url url="mailto:linux-assembly@egroups.com">.
List archives are available at <url url="http://www.egroups.com/list/linux-assembly/">.
<sect1>Frequently asked questions (with answers)<label id="faq">
<p>
Here are frequently asked questions. Answers are taken
@ -1971,13 +1984,15 @@ and get it working. After that, the sky's the limit.
<sect2>How do I debug pure assembly code under Linux?
<p>
If you're using <tt/gas/, you should consult
<url url="http://www.cs.pdx.edu/~bjorn/CS200/linux_tutorial/"
name="Linux assembly Tutorial"> by Bjorn Chambless.
There's an early version of the
<url url="http://www.ellipse.magenet.com/ald.html"
name="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!
With <tt/nasm/ situation is a bit different, since it doesnot
support gdb specific debugging extensions.
Although <tt/gdb/ is source-level debugger, it can be used to debug
You can also try <tt/gdb/ ;).
Although it is source-level debugger, it can be used to debug
pure assembly code, and with some trickery you can make <tt/gdb/ to do what you need.
Here's an answer from <url url="mailto:dl@gazeta.ru" name="Dmitry Bakhvalov">:
@ -2023,6 +2038,10 @@ If you want to set breakpoints across your code, you can just use
<tt/int 3/ instruction as breakpoint (instead of entering address
manually in <tt/gdb/).
If you're using <tt/gas/, you should consult <tt/gas/ and <tt/gdb/ related
<url url="http://linuxassembly.org/resources.html#tutorials" name="tutorials">.
<sect2>Any other useful debugging tools?
<p>
Definitely <tt/strace/ can help a lot (<tt/ktrace/ and <tt/kdump/ on FreeBSD),
@ -2035,7 +2054,7 @@ Read its manual page (<tt/man strace/) and <tt/strace --help/ output for details
Noway. This is protected mode, use OS services instead.
Again, you can't use <tt/int 0x10/, <tt/int 0x13/, etc.
Fortunately almost everything can be implemented
through system calls or library functions.
by means of system calls or library functions.
In the worst case you may go through direct port access,
or make a kernel patch to implement needed functionality.

View File

@ -3,7 +3,7 @@
<title>BogoMips mini-Howto
<author>Wim van Dorst, <htmlurl url="mailto:baron@clifton.hobby.nl"
name="baron@clifton.hobby.nl">
<date>Version 2000-09-22
<date>Version 2000-10-21
<abstract>
This text gives some information about BogoMips, compiled
from various sources such as news and e-mail.
@ -43,17 +43,17 @@ ratings, are reported directly to me, or published on Usenet.
<sect1>The highest single-CPU Linux boot sequence BogoMips value
<p>
<itemize>
<item>Robert A. Morris, <tt/ramorris@yifan.net/
<item>AMD Athlon at 800MHz
<item>1605.63 BogoMips
<item>Rob Farrell <tt/rpf@speakeasy.net/
<item>Intel Pentium III, at 866 MHz
<item>1723.60 BogoMips
</itemize>
<sect1>The highest multiple-CPU Linux boot sequence BogoMips value
<p>
<itemize>
<item>Richard Langis, <tt/rlangis@primux.geekfest.net/
<item>8x Pentium III (Xeon) at 500 MHz, SMP
<item>3996.06 BogoMips
<item>Peter Rival <tt/frival@zk3.dec.com/
<item>31x Alpha EV67 CPUs, at 731 MHz, SMP
<item>46170.90 BogoMips
</itemize>
<sect1>The highest non-Linux BogoMips value
@ -101,7 +101,7 @@ something which is a fake. Hence, the BogoMips value
gives some indication of the processor speed, but it is
way too unscientific to be called anything but BogoMips.
<p>
The reasons (there are two) it is printed during bootup
The reasons (there are two) it is printed during boot-up
is that a) it is slightly useful for debugging and for
checking that the computers caches and turbo button work,
and b) Linus loves to chuckle when he sees confused
@ -175,7 +175,7 @@ CPUs is similar but not the same.
<sect1>How to determine what the current BogoMips rating is
<p>
There are three methods to determing the current BogoMips, viz.
There are three methods to determine the current BogoMips, viz.
<enum>
<item>looking in <tt>/proc/cpuinfo</tt>, e.g., with
@ -196,12 +196,12 @@ program. From the readme file by Jeff Tranter, <tt/jeff_tranter@mitel.com/:
<quote>
`Tired of rebooting your system so you can see how many
BogoMIPS it's running at today? [...] "Bogomips" is a
BogoMips it's running at today? [...] "Bogomips" is a
standalone program that displays your system performance
using one of the world's most recognized benchmarks. It
uses the same code that is used in the Linux kernel while
booting, but runs as a user program. [...] Version 1.3 of
BogoMIPs is now portable and should run on any system
BogoMips is now portable and should run on any system
that supports an ANSI C compiler and library.'
</quote>
@ -300,7 +300,7 @@ referred to as BogoBoost software. Cyrix 5x86 and 6x86 CPUs may
have their BogoMips improved drastically by branch-prediction
(BIOS option). Note that the performance improvement may be
marginal. There are several packages available for adjusting
Cyrix CPUs, such as the bogoboost patch, cx5x86mod, and set6x86,
Cyrix CPUs, such as the BogoBoost patch, cx5x86mod, and set6x86,
all from the normal archives, in obvious places. It is reported
the Cyrix 6x86 CPUs may give better performance when the kernel is
compiled with 486-optimization, instead Pentium-optimization.
@ -352,7 +352,7 @@ approximately 50 different countries. Note that the ratings here are
from the actual Linux booting sequence, except of course for the
section on Non-Linux Systems.
<sect1>Oddly or faultly configured 386 systems
<sect1>Oddly or faultily configured 386 systems
<p>
<verb>
System BogoMips Reporter
@ -456,7 +456,7 @@ section on Non-Linux Systems.
Nx586/110 NexGen 81.51 Ron Marsh <rmarsh@plains.nodak.edu>
</verb>
<sect1>Oddly or faultly configured 486 systems
<sect1>Oddly or faultily configured 486 systems
<p>
<verb>
System BogoMips Reporter
@ -778,7 +778,7 @@ section on Non-Linux Systems.
486SX-U5/40 UMC 0c 26.63 Dusan Mihajlovic <zdule@herkules.co.yu>
</verb>
<sect1>Oddly or faultly configured Pentium systems, or variations
<sect1>Oddly or faultily configured Pentium systems, or variations
<p>
<verb>
System BogoMips Reporter
@ -937,6 +937,7 @@ section on Non-Linux Systems.
* Pentium/60 119.60 Luis Miguel Bruga <lmburga@ieee.org>
Centaur C6-2/233 154.83 Joe Noble <noble@flashman.com>
* Pentium/100 198.66 Patrick Nichols <pat@humbug.org.au>
* Pentium/166 332.60 Electra Flarefire <bcrowe@optushome.com.au>
* Centaur C6-2/200 398.13 Paolo Cravero <cravero@athena.polito.it>
</verb>
@ -1042,6 +1043,7 @@ section on Non-Linux Systems.
Pentium II/466 462.03 Bjorn Lindgren <bjorn@chiba.cx>
Pentium II/504 overcl 502.99 David Hand <dhand@best.com>
Pentium II/515 514.46 NN <luckydaze@netzero.net>
* Pentium II/272 542.31 Ton <ton@somedomain.com>
* Pentium II/350 699.60 Teun Warnaar <tat@dds.nl>
* Pentium II/350 699.50 Jan <jan-bruchsal@gmx.net>
* Pentium II/400 794.62 Mark Dickie <mark@dickie29.freeserve.co.uk>
@ -1082,6 +1084,7 @@ section on Non-Linux Systems.
* Pentium III/700 1441.79 <a.giachino@ekkinc.com>
* Pentium III/730 1461.45 Timm Murray <admin@madtimes.com>
* Pentium III/800 1592.52 Slawomir Axzkowski <slawek@talex.com.pl>
* Pentium III/866 1723.60 Rob Farrell <rpf@speakeasy.net>
</verb>
<sect1>Normal Pentium variations: Cyrix, AMD
@ -1214,6 +1217,7 @@ section on Non-Linux Systems.
AMD K6-2/338 overcl 675.02 Nicola Fabiano <mx8644@mclink.it>
AMD K6-2/350 699.60 Juan Domenech <domenech@mail.seric.es>
AMD K6-2/350 3D 699.60 Mirko Schur <mschur@t-online.de>
AMD K6-2/350 699.60 Craig <craig@pop.uky.edu>
AMD K6-2/350 3D 699.60 D. Breuer <dirk.breuer@post.rwth-aachen.de>
AMD K6-2/366 732.36 Risto A. Paju <rp241@cam.ac.uk>
AMD K6-2/366 734.00 Alex Montaron <canal@multimania.com>
@ -1246,11 +1250,17 @@ section on Non-Linux Systems.
AMD K6-2/455 3D overcl 914.23 Graham Reed <grwr@ssm.ca>
AMD K6-2/475 laptop 943.72 Chris Matthews <chris@masc.ca>
AMD K6-2/475 overcl 950.27 Willow <el-baul@ole.com>
AMD K6-2/475 overcl 950.27 Craig <craig@pop.uky.edu>
AMD K6-2/500 999.42 Jon Berlin <jberlin@worldbank.org>
AMD K6-2/500 3D 999.42 Laurent <blackm@pop.multimania.com>
AMD K6-2/500 999.42 Robert <robert@mrcomputers.net>
AMD K6-2/550 3D 1101.00 Jon Berlin <jberlin@worldbank.org>
AMD K6-2/550 1101.00 James Yang <jamesy@no-email>
AMD K6-2 550 1101.00 Hugh Wilson <hugh.e.wilson@gm.com>
AMD Duron/650 1294.34 Levi Ramsey <lramsey@student.umass.edu>
AMD Duron/700 1395.92 N. Fabiano <nicola.fabiano@pg.infn.it>
AMD Duron/700 1399.19 Stuart Trusty <stuart@linuxlabs.com>
AMD K7/500 498.07 Ludwig <cludwig@informatik.uni-tuebingen.de>
AMD K7/550 548.86 Kieffer <Jerome.KIEFFER@crans.ens-cachan.fr>
@ -1268,12 +1278,11 @@ section on Non-Linux Systems.
* AMD K7/650 1297.61 Travis Brown <tfb999@yahoo.com>
* AMD Athlon/700 1387.51 Bradley Lawrence <cecil@niagara.com>
* AMD Athlon/700 1395.92 Joop Stakenborg <aba@casema.net>
* AMD Athlon/700 1395.92 Martin Kamin <kamin@atlas.cz>
* AMD Athlon/700 1412.30 Ulf Bartelt <ult@twc.de>
) AMD Athlon/750 1494.22 A Galinovic <thehack@fly.srk.fer.hr>
* AMD K7/750 1500.30 W Canaday <rgabill@ameritech.net>
* AMD Athlon/800 1605.63 Robert A. Morris <ramorris@yifan.net>
AMD Duron/700 1395.92 N. Fabiano <nicola.fabiano@pg.infn.it>
AMD Duron/700 1399.19 Stuart Trusty <stuart@linuxlabs.com>
</verb>
<sect1>Normal Alpha systems
@ -1285,7 +1294,7 @@ section on Non-Linux Systems.
21064/150 Jensen 149.49 J.L. Brothers <brothers@halcyon.com>
21064/150 Jensen 148.89 Martin Osterman <ost@comnets.rwth-aachen.de>
21064A/233 AS225 Avanti 228.58 Roberto Giungato <giungator@acm.org>
21064A/233 AS225 Avanti 228.58 Roberto Giungato <r.giungato@computer.org>
21064A/233 Avanti 230.16 Rich Griswold <rgriswold@us.ibm.com>
21064A/275 Cabriolet 271.58 Michal Jaegermann <michal@phys.ualberta.ca>
21064A/275 Cabriolet 272 Linus Torvalds <torvalds@cc.helsinki.fi>
@ -1450,6 +1459,7 @@ section on Non-Linux Systems.
Sparc Ultra I/143 278.00 Helmut <helmut@cancon.com>
Sparc Ultra I sun4u 284.05 Iban Cardona <icc@seric.es>
Sparc Ultra I sun4u 333.41 Roberto Giungato <r.giungato@computer.org>
Sparc Ultra II/270 539.03 Pieter Krul <pieter@dare.demon.nl>
Sparc Ultra II/360 719.26 Bjoern Augustsson <d3august@dtek.chalmers.se>
@ -1590,7 +1600,7 @@ section on Non-Linux Systems.
SMP2 Celeron/400 798.21 Stefan Onderka <nop@gameart.com>
SMP2 Celeron/450 894.57 Stephan Eisler <stephan@lingo.gun.sub.org>
SMP2 Celeron/500 999.42 Ingimar Rovertsson <iar@skyrr.is>
SMP2 Celeron/500 999.42 Rob Farrell <rpf@home.com>
SMP2 Celeron/500 999.42 Rob Farrell <rpf@speakeasy.net>
SMP2 Celeron/515 overc 1028.92 Ryan Werber <rwerber@ctel.net>
SMP2 Celeron/550 overc 1101.00 Olof Zachrisson <eraolza@ks.ericsson.se>
SMP2 Celeron/550 overc 1101.00 John Katagawa <dhc@50k.com>
@ -1610,10 +1620,14 @@ section on Non-Linux Systems.
SMP2 Pentium III/650 1300.88 Dan Kegel <dank@alumni.caltech.edu>
SMP4 Pentium III/450 1794.00 Glenn Stone <glenns@ami.com>
SMP4 Pentium III/550 2195.46 Yan P. Yuan <Yanping.Yuan@EMBL-Heidelberg.de>
* SMP2 Pentium III/600 2401.89 Shawn Hicks <shicks@impulse.net>
* SMP2 Pentium III/600 2401.89 John Wiggins <jwiggins@csce.uark.edu>
* SMP2 Pentium III/750 3001.55 Jesse Tie Ten Quee <tie@mountlinux.com>
SMP8 Pentium III/500 3996.06 Richard Langis <rlangis@primux.geekfest.net>
SMP2 Sparc SS/50 99.84 Dimitris Tsifakis <sv1det@freemail.gr>
SMP31 EV67/731 Wildf. 46170.90 Peter Rival <frival@zk3.dec.com>
</verb>
<sect1>Non-Linux systems (reference only)
@ -1714,17 +1728,14 @@ section on Non-Linux Systems.
<sect>Signature
<p>
I never think that having three children is any sort of a burden,
quite contrarily. Of course, we did notice that having three kids around can
require some proper regulating and scheduling, all quite acceptable
and doable. Last week both <htmlurl url="mailto:roderick@clifton.hobby.nl"
name="Roderick"> and his sister <htmlurl url="mailto:isolde@clifton.hobby.nl"
name="Isolde"> stayed at their grandparents for a couple of nights. That
left Mum and Dad with ONLY baby <htmlurl url="mailto:daphne@clifton.hobby.nl"
name="Daphne">, now just one year old. This led us to believe that we were
back in bachelor days again! What freedom to do and go as you please.
Fortunately, this 'euphoria' didn't last long: we wouldn't want to miss them
for all the money in the world.
This next week
<htmlurl url="mailto:roderick@clifton.hobby.nl" name="Roderick">, and his
sisters <htmlurl url="mailto:isolde@clifton.hobby.nl" name="Isolde"> and
<htmlurl url="mailto:daphne@clifton.hobby.nl" name="Daphne"> have
autumn vacation. They typically 'have nothing to do,' therefore
'must have' their father's PC for playing Sesamestreet and
Busytown games. Oh, well, at least I have the PC during the working
days, for working.
Met vriendelijke groeten, Wim 'Dad' van Dorst.
<verb>

File diff suppressed because it is too large Load Diff