Add Syscall: Exit, PutChar, GetCar, PutString, GetString

This commit is contained in:
Yorick Barbanneau 2021-10-11 22:41:17 +02:00
parent 6f405265a5
commit 80fc250109
15 changed files with 359 additions and 17 deletions

View file

@ -146,6 +146,43 @@ Yield:
j $31
.end Yield
#ifdef CHANGED
.globl PutChar
.ent PutChar
PutChar:
addiu $2,$0,SC_PutChar
syscall
j $31
.end PutChar
.globl PutString
.ent PutString
PutString:
addiu $2,$0,SC_PutString
syscall
j $31
.end PutString
.globl GetChar
.ent GetChar
GetChar:
addiu $2,$0,SC_GetChar
syscall
j $31
.end PutChar
.globl GetString
.ent GetString
GetString:
addiu $2,$0,SC_GetString
syscall
j $31
.end GetString
#endif
/* dummy function to keep gcc happy */
.globl __main
.ent __main