File i2a.s:
I know there are some criticism about div and its slow execution. Please, fell free to criticize it as well as caveats, tips, and tricks.
Simple script I'm using to build it: (it will create bin directory in cwd)
#! /bin/bash
# binaries output directory (objects and executables are placed there)
OUTDIR=bin
[ -d $OUTDIR ] || mkdir $OUTDIR
as --32 $1.s -o $OUTDIR/$1.o \
&& ld -m elf_i386 $OUTDIR/$1.o -o $OUTDIR/$1 \
&& $OUTDIR/$1
Usase:
./build i2a