diff --git a/README.md b/README.md index 3d8bd17..64f6c74 100644 --- a/README.md +++ b/README.md @@ -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** diff --git a/input.s b/input.s new file mode 100644 index 0000000..627cb5e --- /dev/null +++ b/input.s @@ -0,0 +1,8 @@ +PUSH 65 +OUTC +PUSH 1 +ADD +OUTC +PUSH 1 +ADD +OUTC \ No newline at end of file