Improve assembler: can now properly assemble lain.com

This commit is contained in:
Nero 2023-01-01 20:44:43 +00:00
parent 77b1ad7cef
commit 5100d1d84e
5 changed files with 2170 additions and 91 deletions

View file

@ -1,4 +1,7 @@
#!/bin/sh
outfile="$1"
infile="$2"
( awk -f host/asm.awk -v of=sym <"$infile"; cat "$infile") | awk -f host/asm.awk -v of=lst
listing="${outfile%.*}.lst"
( awk -f host/asm.awk -v of=sym <"$infile"; cat "$infile") | awk -f host/asm.awk -v of=lst >"$listing"
grep -A1 '\*\*\*\*' "$listing" && exit 1
cut -d' ' -f2 "$listing" | xxd -r -p >"$outfile"