diff --git a/README.md b/README.md index 7366c59..1baef60 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ If the bytecode attempts to execute more instructions than the the passed value * `UVM32_EVT_END` the program has ended * `UVM32_EVT_ERR` the program has encountered an error * `UVM32_EVT_YIELD` the program has called `yield()` signifying that it requires more instructions to be executed, but has not crashed/hung -* `UVM32_EVT_UVM32_SYSCALL` the program requests some IO via the host +* `UVM32_EVT_SYSCALL` the program requests some IO via the host ## Internals @@ -181,7 +181,7 @@ int main(int argc, char *argv[]) { case UVM32_EVT_END: isrunning = false; break; - case UVM32_EVT_UVM32_SYSCALL: // vm has paused to handle UVM32_SYSCALL + case UVM32_EVT_SYSCALL: // vm has paused to handle UVM32_SYSCALL switch((f_code_t)evt.data.syscall.code) { case F_PRINTD: // Type of F_PRINTD is UVM32_SYSCALL_TYP_U32_WR, so expect value in evt.data.syscall.val.u32 diff --git a/host-arduino/host-arduino.ino b/host-arduino/host-arduino.ino index 5c99a07..98c0f35 100644 --- a/host-arduino/host-arduino.ino +++ b/host-arduino/host-arduino.ino @@ -68,7 +68,7 @@ void loop(void) { case UVM32_EVT_END: isrunning = false; break; - case UVM32_EVT_UVM32_SYSCALL: // vm has paused to handle UVM32_SYSCALL + case UVM32_EVT_SYSCALL: // vm has paused to handle UVM32_SYSCALL switch((f_code_t)evt.data.syscall.code) { case F_PRINTD: Serial.println(evt.data.syscall.val.u32); diff --git a/host-arduino/uvm32.cpp b/host-arduino/uvm32.cpp index e2a1dde..5e920b3 100644 --- a/host-arduino/uvm32.cpp +++ b/host-arduino/uvm32.cpp @@ -158,7 +158,7 @@ uint32_t uvm32_run(uvm32_state_t *vmst, uvm32_evt_t *evt, uint32_t instr_meter) vmst->ioevt.data.syscall.val.u32p = &vmst->core->regs[11]; break; } - vmst->ioevt.typ = UVM32_EVT_UVM32_SYSCALL; + vmst->ioevt.typ = UVM32_EVT_SYSCALL; vmst->ioevt.data.syscall.code = vmst->mappings[i].code; vmst->ioevt.data.syscall.typ = vmst->mappings[i].typ; setStatus(vmst, UVM32_STATUS_PAUSED); diff --git a/host-arduino/uvm32.h b/host-arduino/uvm32.h index 93796bf..40a5992 100644 --- a/host-arduino/uvm32.h +++ b/host-arduino/uvm32.h @@ -23,7 +23,7 @@ typedef enum { typedef enum { UVM32_EVT_ERR, - UVM32_EVT_UVM32_SYSCALL, + UVM32_EVT_SYSCALL, UVM32_EVT_YIELD, UVM32_EVT_END, } uvm32_evt_typ_t; diff --git a/host-mini/host-mini.c b/host-mini/host-mini.c index 9a86bff..9a5fc26 100644 --- a/host-mini/host-mini.c +++ b/host-mini/host-mini.c @@ -38,7 +38,7 @@ int main(int argc, char *argv[]) { case UVM32_EVT_END: isrunning = false; break; - case UVM32_EVT_UVM32_SYSCALL: // vm has paused to handle UVM32_SYSCALL + case UVM32_EVT_SYSCALL: // vm has paused to handle UVM32_SYSCALL switch((f_code_t)evt.data.syscall.code) { case F_PRINTD: // Type of F_PRINTD is UVM32_SYSCALL_TYP_U32_WR, so expect value in evt.data.syscall.val.u32 diff --git a/host-parallel/host-parallel.c b/host-parallel/host-parallel.c index c6eee6c..1f7fe8e 100644 --- a/host-parallel/host-parallel.c +++ b/host-parallel/host-parallel.c @@ -55,7 +55,7 @@ int main(int argc, char *argv[]) { printf("[VM %d ended]\n", scheduler_index); numVmRunning--; break; - case UVM32_EVT_UVM32_SYSCALL: // vm has paused to handle UVM32_SYSCALL + case UVM32_EVT_SYSCALL: // vm has paused to handle UVM32_SYSCALL switch((f_code_t)evt.data.syscall.code) { case F_PRINTD: // Type of F_PRINTD is UVM32_SYSCALL_TYP_U32_WR, so expect value in evt.data.syscall.val.u32 diff --git a/host/host.c b/host/host.c index e3f0b5a..e70280a 100644 --- a/host/host.c +++ b/host/host.c @@ -181,7 +181,7 @@ int main(int argc, char *argv[]) { printf("UVM32_EVT_ERR '%s' (%d)\n", evt.data.err.errstr, (int)evt.data.err.errcode); isrunning = false; break; - case UVM32_EVT_UVM32_SYSCALL: + case UVM32_EVT_SYSCALL: switch((f_code_t)evt.data.syscall.code) { case F_PRINT: printf("%.*s", evt.data.syscall.val.buf.len, evt.data.syscall.val.buf.ptr); diff --git a/uvm32/uvm32.c b/uvm32/uvm32.c index 5831bd8..2443b6b 100644 --- a/uvm32/uvm32.c +++ b/uvm32/uvm32.c @@ -157,7 +157,7 @@ uint32_t uvm32_run(uvm32_state_t *vmst, uvm32_evt_t *evt, uint32_t instr_meter) vmst->ioevt.data.syscall.val.u32p = &vmst->core->regs[11]; break; } - vmst->ioevt.typ = UVM32_EVT_UVM32_SYSCALL; + vmst->ioevt.typ = UVM32_EVT_SYSCALL; vmst->ioevt.data.syscall.code = vmst->mappings[i].code; vmst->ioevt.data.syscall.typ = vmst->mappings[i].typ; setStatus(vmst, UVM32_STATUS_PAUSED); diff --git a/uvm32/uvm32.h b/uvm32/uvm32.h index c7e487b..876d5c4 100644 --- a/uvm32/uvm32.h +++ b/uvm32/uvm32.h @@ -23,7 +23,7 @@ typedef enum { typedef enum { UVM32_EVT_ERR, - UVM32_EVT_UVM32_SYSCALL, + UVM32_EVT_SYSCALL, UVM32_EVT_YIELD, UVM32_EVT_END, } uvm32_evt_typ_t;