mirror of
https://github.com/Plexi09/Nadir-Kernel.git
synced 2026-10-20 15:07:27 +02:00
Removed uneccesary documentation
This commit is contained in:
parent
577d28cd2e
commit
c002e8b250
2 changed files with 7 additions and 19 deletions
13
README.md
13
README.md
|
|
@ -56,17 +56,6 @@ A QEMU window opens and you should see this:
|
|||
|
||||

|
||||
|
||||
Notes:
|
||||
|
||||
- `nadir.img` is a raw floppy image: the 512-byte boot sector first, then the kernel. `-fda` boots it as a BIOS floppy; QEMU's default firmware loads the sector at address `0x7C00` and executes it in 16-bit real mode.
|
||||
- `build/` and `nadir.img` are generated artifacts ignored by git. `make clean` removes them.
|
||||
- The C kernel builds with plain host `gcc` and freestanding flags for now (see `Makefile`); a dedicated `x86-64-elf` cross-compiler is the planned next step.
|
||||
- Running over SSH or in a bare terminal? `make run` needs a window; boot headless instead:
|
||||
```bash
|
||||
qemu-system-x86_64 -fda nadir.img -display curses
|
||||
```
|
||||
Quit with `Ctrl-A` then `X`.
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
| Symptom | Cause |
|
||||
|
|
@ -86,7 +75,7 @@ The full memory map lives in the header comment of `kernel/arch/x86_64/boot.asm`
|
|||
|
||||
## Contributing
|
||||
|
||||
Every contribution is welcome. Please fork and send a pull request if you wish to contribute. You will be credited at the end of this very file. Please see the [CONTRIBUTING](CONTRIBUTING.md) file for more information.
|
||||
Every contribution is welcome. Please fork and send a pull request if you wish to contribute. You will be credited at the end of this very file. Please see [CONTRIBUTING](CONTRIBUTING.md) for more information.
|
||||
|
||||
## License
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Nadir console: VGA text-mode driver (see console.h). */
|
||||
/* VGA text-mode driver (see console.h). */
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
|
@ -9,14 +9,13 @@
|
|||
#define VGA_ADDR 0xB8000
|
||||
#define COLOR_DEFAULT 0x0FU /* white on black */
|
||||
|
||||
/* Cursor position. Lives in BSS, zeroed by stage 2 before kmain runs. */
|
||||
/* Cursor position. Lives in BSS. */
|
||||
static uint8_t cursor_row;
|
||||
static uint8_t cursor_col;
|
||||
|
||||
/* Text buffer: one 16-bit cell per character, low byte is the ASCII code,
|
||||
/* Text buffer, one 16-bit cell per character, low byte is the ASCII code,
|
||||
* high byte is the color attribute. `volatile` so the compiler keeps every
|
||||
* store in order: this is memory-mapped I/O, and dropped or reordered
|
||||
* writes would corrupt the screen. */
|
||||
* store in order. */
|
||||
static volatile uint16_t *const vga = (uint16_t *)VGA_ADDR;
|
||||
|
||||
/* Move every line one row up and blank the last line */
|
||||
|
|
@ -52,12 +51,12 @@ void console_putchar(char c)
|
|||
(uint16_t)((COLOR_DEFAULT << 8) | c);
|
||||
cursor_col++;
|
||||
if (cursor_col >= VGA_WIDTH) {
|
||||
/* Past the right edge: wrap to the next line. */
|
||||
/* Wrap to the next line. */
|
||||
cursor_col = 0;
|
||||
cursor_row++;
|
||||
}
|
||||
}
|
||||
/* Past the bottom line: scroll and stay on the last line. */
|
||||
/* Past the bottom line scroll and stay on the last line. */
|
||||
if (cursor_row >= VGA_HEIGHT) {
|
||||
scroll();
|
||||
cursor_row = VGA_HEIGHT - 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue