mirror of
https://github.com/pnx/m16vm
synced 2026-06-17 03:50:03 +02:00
src/syscall: define write system call
This commit is contained in:
parent
837bd8f892
commit
fa30f39d55
2 changed files with 13 additions and 2 deletions
|
|
@ -20,7 +20,14 @@
|
|||
#include <stdio.h>
|
||||
#include "syscall.h"
|
||||
|
||||
void syscall_write(int16_t value, int8_t op) {
|
||||
void vm_syscall(int16_t number, int8_t op, uint16_t* regs) {
|
||||
|
||||
if (number == SYS_WRITE) {
|
||||
vm_syscall_write(op, regs[15]);
|
||||
}
|
||||
}
|
||||
|
||||
void vm_syscall_write(int8_t op, int16_t value) {
|
||||
|
||||
switch(op) {
|
||||
case SYSW_INT16 :
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue