Added asm code example

This commit is contained in:
Dmitriy Shishkov 2021-04-17 18:40:13 +05:00
parent 80931f9b73
commit 5e3bf761cd
No known key found for this signature in database
GPG Key ID: 7CAE12ED13853CAC
2 changed files with 33 additions and 0 deletions

View File

@ -13,6 +13,31 @@ Stack based virtual machine and assembly code compiler
## Assembly documentation
### Example programm:
Put it into input.s
```asm
PUSH 65
OUTC
PUSH 1
ADD
OUTC
PUSH 1
ADD
OUTC
```
Run
```bash
make
./build/stack_vm build input.s
./build/stack_vm run out.bin
```
It must print first three English characters
### Commands:
- **NONE**

8
input.s Normal file
View File

@ -0,0 +1,8 @@
PUSH 65
OUTC
PUSH 1
ADD
OUTC
PUSH 1
ADD
OUTC