This commit is contained in:
Kartik Agaram 2018-07-16 07:55:07 -07:00
parent 1f56ac6483
commit b8cfbdc866
4 changed files with 17 additions and 0 deletions

View File

@ -49,6 +49,21 @@ Running `subx` will transparently compile it as necessary.
translate`. Useful for debugging, and also enables more thorough testing of
`translate`.
Putting them together, build and run one of the example programs:
<img alt='ex1.1.subx' src='html/ex1.png'>
```
$ ./subx translate ex1.1.subx ex1
$ ./subx run ex1
```
If you're running on Linux, `ex1` will also be runnable directly:
```
$ chmod +x ex1
$ ./ex1
```
I'm not building general infrastructure here for all of the x86 ISA and ELF
format. SubX is about programming with a small, regular subset of 32-bit x86:

View File

@ -1,4 +1,5 @@
## first program: same as https://www.muppetlabs.com/~breadbox/software/tiny/teensy.html
# Just return 42.
#
# To run:
# $ subx translate ex1.1.subx ex1

View File

@ -1,4 +1,5 @@
## first program: same as https://www.muppetlabs.com/~breadbox/software/tiny/teensy.html
# Just return 42.
#
# To run:
# $ subx translate ex1.2.subx ex1

BIN
subx/html/ex1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB