diff options
author | nthnluu <nate1299@me.com> | 2024-01-28 21:20:27 -0500 |
---|---|---|
committer | nthnluu <nate1299@me.com> | 2024-01-28 21:20:27 -0500 |
commit | c63f340d90800895f007de64b7d2d14624263331 (patch) | |
tree | 2c0849fa597dd6da831c8707b6f2603403778d7b /user/usr/bin/hello.c |
Created student weenix repository
Diffstat (limited to 'user/usr/bin/hello.c')
-rw-r--r-- | user/usr/bin/hello.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/user/usr/bin/hello.c b/user/usr/bin/hello.c new file mode 100644 index 0000000..894f062 --- /dev/null +++ b/user/usr/bin/hello.c @@ -0,0 +1,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; +} |