Add some tests
This commit is contained in:
parent
2a3198c949
commit
5cccda4af3
3 changed files with 25 additions and 0 deletions
9
code/test/getchar.c
Normal file
9
code/test/getchar.c
Normal file
|
@ -0,0 +1,9 @@
|
|||
#include "syscall.h"
|
||||
|
||||
int main(){
|
||||
do {
|
||||
char c = GetChar();
|
||||
PutChar(c);
|
||||
PutChar('\n');
|
||||
} while(1 == 1);
|
||||
}
|
9
code/test/getint.c
Normal file
9
code/test/getint.c
Normal file
|
@ -0,0 +1,9 @@
|
|||
#include "syscall.h"
|
||||
|
||||
int main(){
|
||||
do {
|
||||
int number = GetInt();
|
||||
PutInt(number);
|
||||
PutChar('\n');
|
||||
} while(1 == 1);
|
||||
}
|
7
code/test/putint.c
Normal file
7
code/test/putint.c
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include "syscall.h"
|
||||
|
||||
int main(){
|
||||
PutInt(10);
|
||||
PutInt(110);
|
||||
PutInt(007);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue