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
17
code/test/putchar.c
Normal file
17
code/test/putchar.c
Normal file
|
@ -0,0 +1,17 @@
|
|||
#include "syscall.h"
|
||||
void print(char c, int n)
|
||||
{
|
||||
int i;
|
||||
//#if 0
|
||||
for (i = 0; i < n; i++) {
|
||||
PutChar(c + i);
|
||||
}
|
||||
PutChar('\n');
|
||||
//#endif
|
||||
}
|
||||
int
|
||||
main()
|
||||
{
|
||||
print('a',4);
|
||||
Halt();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue