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
+4 -4
View File
@@ -19,17 +19,17 @@ First, decide where your program needs to be loaded in memory. The default LVA (
Then, most probably, you'll want to use the provided wrapper:
```sh
[LVA=...] ./amach path/to/program.bin
[LVA=...] ./amach path/to/program.bin [...arguments]
```
Or you can run the following:
```sh
od -An -v -tu1 path/to/program.bin | POSIXLY_CORRECT=1 awk -f amach.awk [-v LVA=...]
od -An -v -tu1 path/to/program.bin | POSIXLY_CORRECT=1 awk -f amach.awk [-v LVA=...] [-v CMD_OPTS=...]
```
But in case you already have a program in the `.dec` format, you can pass it directly to AWK:
```sh
POSIXLY_CORRECT=1 awk -f amach.awk [-v LVA=...] -- path/to/program.dec
POSIXLY_CORRECT=1 awk -f amach.awk [-v LVA=...] [-v CMD_OPTS=...] -- path/to/program.dec
```
### ELF Executables
@@ -41,7 +41,7 @@ POSIXLY_CORRECT=1 awk -f amach.awk [-v LVA=...] -- path/to/program.dec
You can launch ELF files directly using the wrapper or via the same pipe pipeline:
```sh
./amach path/to/program.elf
./amach path/to/program.elf [...arguments]
```
## Support