Add Syscall: Exit, PutChar, GetCar, PutString, GetString
This commit is contained in:
parent
6f405265a5
commit
80fc250109
15 changed files with 359 additions and 17 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue