colorful rat Ratfactor.com > Dave's Repos

pftgu_nasm

NASM ports of exercises from "Programming from the Ground Up"
git clone http://ratfactor.com/repos/pftgu_nasm/pftgu_nasm.git

Files

README.md

NASM ports of exercises from Programming from the Ground Up

The 2003 book Programming from the Ground Up is an excellent primer for 32-bit (i386) architecture assembly (and fundamental programming in general). I’ve got a paper copy, but you can also read it for free at archive.org:

https://archive.org/details/programming-from-the-ground-up

This repo contains my NASM translations of the programs. The go.sh shell script assembles, links, and runs them. Just leave off the file extension.

Here’s the examples and their output:

# Exit
#
$ ./go.sh ch03.1_exit
Exited with code: 0

# Find largest value in array of doubles
#
$ ./go.sh ch03.2_maximum
Exited with code: 222

# Call a function to compute exponent
#
$ ./go.sh ch04.1_power_function
Exited with code: 33

# Call recursive function to compute factorial
#
$ ./go.sh ch04.2_factorial
Exited with code: 24

Personal note: I like this book a lot, but I do not endorse the author or his views outside of this one single subject.