From c63f340d90800895f007de64b7d2d14624263331 Mon Sep 17 00:00:00 2001 From: nthnluu Date: Sun, 28 Jan 2024 21:20:27 -0500 Subject: Created student weenix repository --- user/usr/bin/hello.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 user/usr/bin/hello.c (limited to 'user/usr/bin/hello.c') 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 +#include + +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; +} -- cgit v1.2.3-70-g09d2