Hello demo program

This commit is contained in:
Imbus 2025-03-31 19:48:37 +02:00
parent 413bb11dab
commit 641ebb302a
2 changed files with 14 additions and 0 deletions

View file

@ -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
View 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);
}