mirror of
https://github.com/ringtailsoftware/uvm32.git
synced 2026-06-05 22:43:39 +00:00
Fix overly long event name
This commit is contained in:
parent
86f93be100
commit
c691c3ebdf
9 changed files with 10 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue