diff --git a/iso/boot/kernel.elf b/iso/boot/kernel.elf index 8423cb0..3d9bb72 100755 Binary files a/iso/boot/kernel.elf and b/iso/boot/kernel.elf differ diff --git a/src/kernel/kmain.c b/src/kernel/kmain.c index 246ca7c..5ca323b 100644 --- a/src/kernel/kmain.c +++ b/src/kernel/kmain.c @@ -33,6 +33,7 @@ int kmain(int retvalue) clear(); colorputs(ascii_title, 10); + colorputs(" by @xamidev - star the repo for a cookie!\n\n", 11); // TODO: Grub modules to load programs diff --git a/src/kernel/shell.c b/src/kernel/shell.c index 763500f..34831cb 100644 --- a/src/kernel/shell.c +++ b/src/kernel/shell.c @@ -21,7 +21,7 @@ void shell_install() } else if (strcmp(input_buffer, "help") == 0) { - printf("This is the Blank Operating System\ndesigned for fun by xamidev\n\nCommand help:\n\n\thelp - shows this message\n\tpanic - makes the kernel panic\n\twords - generates random words\n\tprimes - computes prime numbers\n"); + printf("help\tpanic\twords\tprimes\trainbow\tclear\n"); } else if (strcmp(input_buffer, "panic") == 0) { @@ -35,6 +35,14 @@ void shell_install() { program_primes(); } + else if (strcmp(input_buffer, "rainbow") == 0) + { + program_rainbow(); + } + else if (strcmp(input_buffer, "clear") == 0) + { + program_clear(); + } else { printf("Unknown command %s\n", input_buffer); } diff --git a/src/programs/misc.c b/src/programs/misc.c new file mode 100644 index 0000000..3836373 --- /dev/null +++ b/src/programs/misc.c @@ -0,0 +1,31 @@ +// Miscellaneous small programs + +#include "../libc/stdio.h" + +// Print a rainbow colorful text for testing + +#define BUF_SIZE 256 +#define COLORS 20 + +void program_rainbow() +{ + char input_buffer[BUF_SIZE]; + puts("What to print? "); + get_input(input_buffer, BUF_SIZE); + puts("\n"); + + for (int i=0; i