added POSIX AWK reference implementation

This commit is contained in:
Luxferre
2025-04-23 15:05:00 +03:00
parent 5577146162
commit db8422a1fd
3 changed files with 172 additions and 3 deletions
+8
View File
@@ -256,6 +256,8 @@ works on the platforms supporting I/O port 1 (character output).
If you just want to test an implementation, assembled MU8 machine code files
(in the plaintext format) are stored in the `examples/assembled` subdirectory.
After loading into the REPL, you can run each of them with the `0 1 0 0 1` or
`0 1 6 0 1` sequence.
Reference implementations
-------------------------
@@ -274,6 +276,12 @@ Reference implementations
`fma()` call that appeared in the C99 standard. Accepts a file name to preload
a MU8 machine code program from the OS command line. Compile the source with:
`cc -std=c99 -O2 -s -lm -o mu808 mu808.c`
* [POSIX AWK implementation](mu808.awk): supports the entire mu808 specification
sans the (non-portable) I/O port 2. Run it like this:
`LC_ALL=C awk -f mu808.awk [- input_program.mu8]`, where the dash-delimited
program file name is optional and used for preloading MU8 program files into
VM's memory. The Busybox AWK implementation is compact but quite slow, so use
it as a last resort solution when no other programming environment is available.
### Assembler reference implementations