diff --git a/docs/DEVELOPERS.md b/docs/DEVELOPERS.md
index 760e985..1072ad1 100644
--- a/docs/DEVELOPERS.md
+++ b/docs/DEVELOPERS.md
@@ -1,5 +1,12 @@
# Blank OS Developer's Manual
+## Table of Contents
+
+- [Getting Started](#getting-started)
+- [Writing programs for BlankOS](#writing-programs)
+- [Changing the TTY font](#changing-font)
+
+
## Getting Started
### System description
@@ -27,7 +34,10 @@ gdb kernel.elf
(gdb) target remote localhost:1234
```
-## Making programs for the OS
+
+## Writing programs for BlankOS
+
+Be warned, these are not actual programs in the sense you'd expect. These are indeed functions that are called from the shell, and embedded in the kernel ELF binary. Real programs apart from the kernel are not yet a thing here, but might be one day.
### Step 1 - Making the program and the entry point
@@ -86,4 +96,19 @@ The linking process should be taken care of by the appropriate Linker script `li
If you're proud of what you've made, you can clone the repo, make your changes, open a pull request and maybe your program will be added to the main BlankOS repo, and later distributed in the new ISOs!
+
+## Changing the TTY font
+In order to change the default font, first get your hands on a 8x16 `.psf` (PC Screen Font 2) formatted font. Then, put it in `include/fonts` and remove the default one (`UniCyr_8x16.psf`).
+
+Go ahead and run `make` one time. The compilation/linking will fail because of unresolved symbols, but an object file should have been created in `build/fonts` with your custom font's name.
+
+Read the symbols in that object file:
+
+```
+readelf -s -W build/fonts/YOUR_FONT_8x16.o
+```
+
+Get the symbol name that ends with `_start` and replace all occurences of it in the `src/drivers/framebuffer.c` file.
+
+Then, run `make` again and the font should have changed properly.
diff --git a/src/kernel/shell.c b/src/kernel/shell.c
index 4dc3692..de32a88 100644
--- a/src/kernel/shell.c
+++ b/src/kernel/shell.c
@@ -25,6 +25,8 @@ char* motd[] =
};
int motd_size = sizeof(motd)/sizeof(motd[0]);
+bool do_splash = true;
+
void splash()
{
int random = randint(time_seed());
@@ -87,7 +89,11 @@ int parse_input(char* input, char* argv[], int max_args)
void shell_install()
{
- splash();
+ if (do_splash == true)
+ {
+ do_splash = false;
+ splash();
+ }
register_command("help", program_help);
register_command("panic", program_panic);
diff --git a/src/libc/stdio.h b/src/libc/stdio.h
index 84dac49..5511d08 100644
--- a/src/libc/stdio.h
+++ b/src/libc/stdio.h
@@ -56,12 +56,35 @@ void dtostrf(double val, char *buffer, int precision);
enum Colors
{
// AARRGGBB?
- white = 0xFFFFFFFF,
- black = 0x00000000,
- red = 0x00FF0000,
- green = 0x0000FF00,
- blue = 0x000000FF,
- yellow = 0x00FFFF00,
+ white = 0xFFFFFFFF,
+ black = 0x00000000,
+ red = 0x00FF0000,
+ green = 0x0000FF00,
+ blue = 0x000000FF,
+ yellow = 0x00FFFF00,
+ cyan = 0x0000FFFF,
+ magenta = 0x00FF00FF,
+ orange = 0x00FFA500,
+ purple = 0x00800080,
+ brown = 0x00A52A2A,
+ gray = 0x00808080,
+ pink = 0x00FFC0CB,
+ lime = 0x00BFFF00,
+ navy = 0x00000080,
+ teal = 0x00008080,
+ maroon = 0x00800000,
+ olive = 0x00808000,
+ silver = 0x00C0C0C0,
+ gold = 0x00FFD700,
+ indigo = 0x004B0082,
+ violet = 0x00EE82EE,
+ coral = 0x00FF7F50,
+ turquoise = 0x0040E0D0,
+ salmon = 0x00FA8072,
+ chocolate = 0x00D2691E,
+ khaki = 0x00F0E68C,
+ lavender = 0x00E6E6FA,
+ beige = 0x00F5F5DC
};
#endif
diff --git a/src/programs/ciphers.c b/src/programs/ciphers.c
index 4d9a324..4ff9460 100644
--- a/src/programs/ciphers.c
+++ b/src/programs/ciphers.c
@@ -29,14 +29,27 @@ void rot13(char* input, char* output)
output[i] = '\0';
}
-void program_rot13()
+void program_rot13(int argc, char* argv[])
{
- char input_buffer[BUFFER_SIZE];
- char output[BUFFER_SIZE];
- puts("String? ");
- get_input(input_buffer, BUFFER_SIZE);
+ if (argc < 2)
+ {
+ printf("Usage: %s \n", argv[0]);
+ return;
+ }
+
+ char input_buffer[BUFFER_SIZE] = {0};
+ char output[BUFFER_SIZE] = {0};
+
+ for (int i=1; i\n", argv[0]);
+ return;
+ }
+
char output[512];
- char input_buffer[BUFFER_SIZE];
- puts("String? ");
- get_input(input_buffer, BUFFER_SIZE);
- to_morse(input_buffer, output);
- printf("\n%s\n", output);
+ char message[BUFFER_SIZE];
+
+ for (int i=1; i\n", argv[0]);
+ return;
+ }
+
+ char input_buffer[BUF_SIZE] = {0};
+ for (int i=1; i