cmdline support

This commit is contained in:
Luxferre
2026-06-19 08:09:18 +03:00
parent e79d71d323
commit bcceaf6aae
5 changed files with 151 additions and 9 deletions
+14 -2
View File
@@ -1,4 +1,16 @@
#!/bin/sh
# A-Machine .bin launcher wrapper
# A-Machine .bin/.elf launcher wrapper
[ -z "$LVA" ] && LVA=65712 # 0x100b0
od -An -v -tu1 "$1" | POSIXLY_CORRECT=1 awk -f amach.awk -v LVA="$LVA"
SEP=$(printf '\001')
CMD_OPTS=""
first=1
for arg in "$@"; do
if [ "$first" = 1 ]; then
CMD_OPTS="$arg"
first=0
else
CMD_OPTS="$CMD_OPTS$SEP$arg"
fi
done
[ -z "$AWK" ] && AWK=awk
od -An -v -tu1 "$1" | POSIXLY_CORRECT=1 $AWK -f amach.awk -v LVA="$LVA" -v CMD_OPTS="$CMD_OPTS"