aboutsummaryrefslogtreecommitdiff
path: root/user/usr/bin/hello.c
blob: 894f062e80ce479d9f28f25f194b3b2168171951 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*
 * The classic hello world program.
 * If you can run this successfully, you should high-five
 * everyone nearby. You can also shout loudly. People
 * will understand.
 */

#include <fcntl.h>
#include <unistd.h>

int main(int argc, char **argv)
{
    open("/dev/tty0", O_RDONLY, 0);
    open("/dev/tty0", O_WRONLY, 0);
    write(1, "Hello, world!\n", 14);
    return 0;
}