projects:
; various UNIX projects written in assembly language
; of course all of them feature extremely small size
; if you’re looking for source code and examples, here they are
name | short description | platform | OS | assembler |
asmutils | miscellaneous utilities, small libc | IA32 | Linux, *BSD (Unixware, Solaris, AtheOS, BeOS) | nasm |
libASM | assembly library (lots of various routines) | IA32 | Linux | nasm |
e3 | WordStar-like text editor | IA32 | Linux, *BSD, AtheOS, BeOS, Win32 | nasm |
ec64 | Commodore C64 emulator | IA32 | Linux | nasm |
lib4th | Forth kernel implemented as shared library | IA32 | Linux | nasm |
Tiny Programs | tiny Linux executables | IA32 | Linux | nasm |
Softer | Orange terminal emulator | IA32 | Linux | nasm |
ta | traffic accounting daemon | IA32 | Linux | nasm |
cpuburn | CPU loading utilities | IA32 | Linux, FreeBSD | gas |
H3sm | 3-stack Forth-like language (and other stuff from Rick Hohensee) |
IA32 | Linux | gas |
F4 | x86 Linux fig-Forth | IA32 | Linux | gas |
eforth | eforth converted to nasm/asmutils | IA32 | Linux | nasm |
eforth | original Linux eforth | IA32 | Linux | gas |
ASMIX | several command-line utilities | IA32, PPC, SPARC, PDP11 | Linux, FreeBSD, LynxOS, Solaris, Unixware, SunOS | gas |
Bizarre Source, Corp | several system utilities | IA32 | Linux | gas |
VMW Assembly tricks | linux_logo and other ASCII tricks in assembly | IA32, IA64, Alpha, PPC, SPARC, S390 | Linux | gas |
acid | small textmode intro | IA32, ARM | Linux | nasm, gas |
asm-toys | few utilities | IA32 | Linux | gas |
smallutils | few small utils in assembly and C | IA32, SPARC | Linux | gas |
There are quite a lot of mixed C-assembly projects, like GNU MP library, ATLAS/BLAS, OpenGUI, FreeAmp, just to name few. Also see source code of your kernel and libc. All this will provide you examples of assembly programming on different hardware platforms.
documentation:
; Various documents on the topic
; Some of them are mustread
Linux Assembly HOWTO
List of Linux/i386 system calls, also this one and this one. Linux Kernel Internals provides useful information too,
read at least particular How System Calls Are Implemented on i386 Architecture? chapter.
Using the GNU Assembler ( gas manual )
; CPU manuals and assembly programming guides (also see this list)
IA-32 (x86): | sandpile.org, x86.org, Intel, AMD, Cyrix, x86 bugs, optimization |
x86-64: | AMD x86-64(tm) technology |
IA-64: | Intel Itanium manuals, IA-64 Linux |
ARM: | ARM Assembler Programming |
Alpha: | Compaq Tru64 UNIX 5.1, Digital UNIX 4.0, other manuals, old Digital Documentation Library |
SPARC: | SPARC International Standard Documents Repository, Technical SPARC CPU Resources |
PA-RISC: | PA-RISC technical documentation |
PPC: | Beginners Guide to PowerPC Assembly Language, Introduction to assembly on the PowerPC |
MIPS: | MIPS Online Publications Library |
; Executable formats
Current ELF draft
Older System V ABIs
Kickers of ELF
Programmer’s File Format Collection
; Books
The Art Of Assembly
by Randall Hyde. Classic book on x86 assembly programming, Windows and Linux (32bit) and DOS (16bit).
PC Assembly Language
by Paul Carter. 32bit protected mode programming, Windows and Linux (NASM).
Programming from the Ground Up
by Jonathan Bartlett. Introduction to programming based on Linux and assembly language (GAS).
Assembler for DOS, Windows and UNIX
by Sergey Zubkov. ISBN 5-89818-019-2, 637 pages, 1999. In Russian language.
Inner Loops : A Sourcebook for Fast 32-Bit Software Design
by Rick Booth. ISBN: 0201479605, 364 pages, 1997; Addison-Wesley Pub Co
Assembly Language Step-By-Step; Programming with DOS and Linux with CDROM
by Jeff Duntemann. ISBN: 0471375233, 612 pages, 2000; John Wiley & Sons
Linux Assembly Language Programming
by Bob Neveln. ISBN: 0130879401, 350 pages, 2000; Prentice Hall Computer Books
Linux Assembly
by Peter Berends. x86 assembly programming in Linux environment. In Dutch language.
Introduction to RISC Assembly Language Programming
by John Waldron. ISBN: 0201398281
SPARC Architecture, Assembly Language Programming, and C
by Richard Paul.
; Articles
Startup state of a Linux/i386 ELF binary
Self-modifying code under Linux
Using the framebuffer device under Linux
Using the audio device under Linux
Using the raw keyboard mode under Linux
Using Mode X via direct VGA access under Linux
Using virtual terminals under Linux
tutorials:
; If you’re new to UNIX assembly programming, this is where you begin
Introduction to UNIX assembly programming ( nasm; Linux, *BSD, BeOS )
Using Assembly Language in Linux ( AT&T and Intel syntax, gcc inline assembly )
Introductory Linux Assembler Tutorial ( gas and the Co )
Writing A Useful Program With NASM ( nasm )
Linux assembly tutorial ( gas, gdb )
Linux socket/network programming ( gas )
How do I write “Hello, world” in FreeBSD assembler? ( as )
FreeBSD Assembly Programming tutorial ( nasm )
Inline assembly for x86 in Linux ( gas and gcc inline assembly )
DJGPP QuickAsm Programming Guide ( gas and gcc inline assembly )
Brennan’s Guide to Inline Assembly ( gcc inline assembly )
Introduction to GCC Inline Asm ( gcc inline assembly )
SPARC assembly “Hello world” ( NetBSD, SunOS, Solaris )
GNOME application in IA32 assembly ( nasm, gcc )
A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linux
another tiny example illustrating a tiny ELF header ( nasm )
links:
; Links to somehow related projects
; tools
NASM | x86 assembler with Intel syntax |
FASM | another promising x86 assembler with Intel syntax |
OTCCELF | tiny C compiler, generates a dynamically linked ELF file |
ALD | Assembly Language Debugger |
BASTARD | Bastard Disassembly Environment |
DUDE | Despotic Unix Debugging Engine |
BIEW | console hex viewer/editor with built-in disassembler |
HTE | viewer/editor/analyzer for text, binary, and executable files |
UPX | Ultimate Packer for eXecutables |
Intel2gas | converter between AT&T and Intel assembler syntax |
A2I | converter from AT&T to Intel assembler syntax |
TA2AS | converter from TASM to AT&T assembler syntax |
SPARC ASM | SPARC v8 assembler & disassembler |
binutils | as they are: gas, ld, ar, etc |
; sites
Jan’s Linux & Assembler page | various source code examples |
H-Peter Recktenwald’s page | “The Int80h page” |
Karsten Scheibler’s page | “Unused Inode” |
G. Adam Stanislav’s page | FreeBSD related material |
Bruce Ediger’s page | SPARC assembly related material |
Michael Blomgren’s page | |
Assembly Programming Journal | |
Phrack Magazine |