mirror of
https://github.com/ringtailsoftware/uvm32.git
synced 2026-06-05 22:43:39 +00:00
Make yield a regular syscall taking an argument.
Allows "wait for interrupt"/"wait for event" type operation where VM code blocks until the host has something for it.
This commit is contained in:
parent
d52baca7b2
commit
e07eeab043
14 changed files with 88 additions and 24 deletions
|
|
@ -57,6 +57,8 @@ void loop(void) {
|
|||
break;
|
||||
case UVM32_EVT_SYSCALL: // vm has paused to handle UVM32_SYSCALL
|
||||
switch(evt.data.syscall.code) {
|
||||
case UVM32_SYSCALL_YIELD:
|
||||
break;
|
||||
case UVM32_SYSCALL_PUTC:
|
||||
Serial.print((char)uvm32_getval(&vmst, &evt, ARG0));
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue