Index: Makefile
===================================================================
--- Makefile	(revision f38d645e8ea0fdba9076730cf83402dc46f28d16)
+++ Makefile	(revision 87361de754d161ca2a24be0d40bfcf08294c1184)
@@ -7,4 +7,5 @@
 CROSS_AR :=		$(CROSS_PRE)-ar
 CROSS_OBJC :=	$(CROSS_PRE)-objcopy
+CROSS_NM :=		$(CROSS_PRE)-nm
 
 # -mshort sets the size of an int to 16 bits; important for interop with
@@ -24,5 +25,5 @@
 HEADERS :=		$(wildcard include/*.h)
 
-all:			bios.abs midas.abs
+all:			bios.img midas.abs
 
 PROLOG_C :=		croot.c
@@ -165,7 +166,4 @@
 build/%.o:		rom/%.s $(HEADERS) | build
 				$(CROSS_GCC) $(FLAGS_ASM) -c -o $@ $<
-
-bios.abs:		bios.img
-				cp bios.img bios.abs
 
 bios.img:		bios.elf
@@ -211,6 +209,8 @@
 				$(CROSS_GCC) $(FLAGS_ASM) -c -o $@ $<
 
-midas.abs:		midas.img
-				cp midas.img midas.abs
+midas.abs:		midas.elf midas.img
+				misc/mkhd.sh $(CROSS_NM) midas.elf >/tmp/midas.hdr
+				cat /tmp/midas.hdr midas.img >midas.abs
+				rm /tmp/midas.hdr
 
 midas.img:		midas.elf
Index: misc/mkhd.sh
===================================================================
--- misc/mkhd.sh	(revision 87361de754d161ca2a24be0d40bfcf08294c1184)
+++ misc/mkhd.sh	(revision 87361de754d161ca2a24be0d40bfcf08294c1184)
@@ -0,0 +1,73 @@
+#!/bin/bash
+
+if [ -z "${1}" -o -z "${2}" ]; then
+    echo "usage: mkhd.sh cross-nm elf-file"
+    exit 1
+fi
+
+CROSS_NM=${1}
+ELF_FILE=${2}
+
+${CROSS_NM} --help >/dev/null 2>&1
+
+if [ ${?} -ne 0 ]; then
+    echo "error while executing ${CROSS_NM}"
+    exit 1
+fi
+
+if [ ! -e ${ELF_FILE} ]; then
+    echo "${ELF_FILE} does not exist"
+    exit 1
+fi
+
+getsym() {
+    NAME=${1}
+    HEX=$(${CROSS_NM} ${ELF_FILE} | grep ' '${NAME}'$' | cut -c -8)
+    RET=$(printf '%d' 0x${HEX})
+    printf '  %7s  %10s  %6s\n' ${NAME} 0x${HEX} ${RET} >&2
+}
+
+echo "creating header for ${ELF_FILE}'s sections:" >&2
+echo >&2
+
+getsym _Lo_RAM; SYM_LO_RAM=${RET}
+getsym _etext;  SYM_ETEXT=${RET}
+getsym _edata;  SYM_EDATA=${RET}
+getsym _end;    SYM_END=${RET}
+
+echo >&2
+
+LEN_TEXT=$((${SYM_ETEXT} - ${SYM_LO_RAM}))
+LEN_DATA=$((${SYM_EDATA} - ${SYM_ETEXT}))
+LEN_BSS=$((${SYM_END} - ${SYM_EDATA}))
+
+out8() {
+    VAL8=${1}
+    HEX8=$(printf '%x' ${VAL8})
+    printf "\x${HEX8}"
+}
+
+out16() {
+    VAL16=${1}
+    HI16=$((VAL16 / 256))
+    LO16=$((VAL16 % 256))
+    out8 ${HI16}
+    out8 ${LO16}
+}
+
+out32() {
+    VAL32=${1}
+    HI32=$((VAL32 / 65536))
+    LO32=$((VAL32 % 65536))
+    out16 ${HI32}
+    out16 ${LO32}
+}
+
+out16 24602
+out32 ${LEN_TEXT}
+out32 ${LEN_DATA}
+out32 ${LEN_BSS}
+out32 0
+out32 0
+out32 ${SYM_LO_RAM}
+out16 65535
Index: readme.txt
===================================================================
--- readme.txt	(revision f38d645e8ea0fdba9076730cf83402dc46f28d16)
+++ readme.txt	(revision 87361de754d161ca2a24be0d40bfcf08294c1184)
@@ -32,6 +32,5 @@
 
 In particular, there's no code for anything related to the actual
-sound generation. This seems to happen entirely on different hardware,
-which the code refers to as the "FPU" - possibly something DSP-based.
+sound generation.
 
 Building with a GCC cross-compiler
@@ -94,5 +93,5 @@
 Once you have the cross-toolchain in place, invoke
 
-  make bios.abs
+  make bios.img
 
 from the top-level directory of this repository to build the BIOS and
