Hello demo program
This commit is contained in:
parent
413bb11dab
commit
641ebb302a
2 changed files with 14 additions and 0 deletions
1
Makefile
1
Makefile
|
@ -120,6 +120,7 @@ mkfs/mkfs: mkfs/mkfs.c $K/fs.h $K/param.h
|
||||||
UPROGS=\
|
UPROGS=\
|
||||||
$U/_cat\
|
$U/_cat\
|
||||||
$U/_echo\
|
$U/_echo\
|
||||||
|
$U/_hello\
|
||||||
$U/_forktest\
|
$U/_forktest\
|
||||||
$U/_grep\
|
$U/_grep\
|
||||||
$U/_init\
|
$U/_init\
|
||||||
|
|
13
user/hello.c
Normal file
13
user/hello.c
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
#include "kernel/types.h"
|
||||||
|
#include "kernel/stat.h"
|
||||||
|
#include "user/user.h"
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
char hello[] = "Hello XV6!\n";
|
||||||
|
|
||||||
|
write(1, hello, sizeof(hello));
|
||||||
|
|
||||||
|
exit(0);
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue