From 0e444e957f189789b071729d9eaf04c86255c529 Mon Sep 17 00:00:00 2001 From: dekunukem Date: Wed, 8 Feb 2023 19:25:58 +0000 Subject: [PATCH] fix typo --- duckyscript3_bytecode_vm.md | 8 ++++---- .../ds3/duckypad_config_latest_source.zip | Bin 33715 -> 33715 bytes 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/duckyscript3_bytecode_vm.md b/duckyscript3_bytecode_vm.md index 870d36d2..e701af32 100644 --- a/duckyscript3_bytecode_vm.md +++ b/duckyscript3_bytecode_vm.md @@ -18,11 +18,11 @@ In duckyScript 1, it's sufficient to simply parse line-by-line, as each line is duckyScript 3 introduced variables, `IF` statements, `WHILE` loops, and function calls. -Now much more complex, it makes sense to compile the script into bytecode and execute it on a virtual machine instead. +Being much more complex, it makes sense to compile the script into bytecode and execute it on a virtual machine instead. ## Virtual Stack Machine -DPDS3 VM is a simple stack machine with two stacks, and a Program Counter (PC). +DPDS3 VM is a simple stack machine with two stacks and a Program Counter (PC). * PC points to the current instruction being executed. @@ -52,7 +52,7 @@ The binary file should have extension `.dsb` (duckyScript binary). Normally this is taken care of in the configurator. But you can also try it out on its own: -* [Download the source code](pc_software/ds3/duckypad_config_latest_source.zip) +* [Download the source code](https://github.com/dekuNukem/duckyPad/raw/master/pc_software/ds3/duckypad_config_latest_source.zip) * Unzip, and run with Python 3: `python3 make_bytecode.py input output` @@ -121,7 +121,7 @@ All reference to **"stack"** refers to **Arithmetic Stack**. Unless noted otherw | Opcode
Name | Byte 0
Decimal | Byte 0
Hex | Comment | Byte 1 | Byte 2 | |:-------:|:---:|:----:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:---------:|:---------:| | NOP | 0 | 0x0 | Do nothing | | | -| PUSHC | 1 | 0x1 | Push a constant on stack | CONST_LSB | CONST_LSB | +| PUSHC | 1 | 0x1 | Push a constant on stack | CONST_LSB | CONST_MSB | | PUSHV | 2 | 0x2 | Push value at ADDR on stack | ADDR_LSB | ADDR_MSB | | POP | 3 | 0x3 | Pop one item off top of stack
Write it to ADDR | ADDR_LSB | ADDR_MSB | | BRZ | 4 | 0x4 | Pop one item off top of stack
If value is zero, jump to ADDR | ADDR_LSB | ADDR_MSB | diff --git a/pc_software/ds3/duckypad_config_latest_source.zip b/pc_software/ds3/duckypad_config_latest_source.zip index 589dede86c72de84950e8bf07aebfe1e8490f547..c09fe52e03f3da7808ad222754ec8b7d5c2da640 100644 GIT binary patch delta 148 zcmdno&a}CmX~X$?)_;PIavvvOsZU_-pXdZ+SvJH&#pVK8dUdb0KTl?CjD(8CH-9>mMdxsZU_dx~>jnSvJJ8a&6H7vgQI=jv|(FA15<5MzTJf zECm#cZwzBSo}vb1?P`o*?fn2!C*BmxdNN8A$f|4#WsOwV0