Deleted unuseful documentation
This commit is contained in:
parent
28f9618ec2
commit
4212d287f0
|
@ -1,48 +0,0 @@
|
|||
I. File structure
|
||||
-----------------
|
||||
|
||||
A. Root directory
|
||||
-----------------
|
||||
|
||||
File structure
|
||||
--------------
|
||||
|
||||
iso - GRUB directory that is used for emulation
|
||||
|
||||
kmain.c - kernel source code
|
||||
|
||||
loader.s - entry point in the OS that passes execution to kernel
|
||||
|
||||
modules/ - list of modules, each module is kept in a different directory
|
||||
|
||||
config/ - folder for config files
|
||||
|
||||
scripts/ - useful scripts and templates
|
||||
|
||||
Documentation.txt - file that describes important aspects about the
|
||||
structure, implementation, functionality, etc
|
||||
|
||||
README.md - brief explanation of the project
|
||||
|
||||
Makefile - makefile to build the whole project
|
||||
|
||||
Makefile rules
|
||||
--------------
|
||||
|
||||
all - recursively build all modules and combine them to get the kernel
|
||||
|
||||
run - run the OS in bochs emulator
|
||||
|
||||
clean - clean unimportant files (objects, executables, etc)
|
||||
|
||||
B. Module directories
|
||||
---------------------
|
||||
|
||||
File structure
|
||||
--------------
|
||||
|
||||
include/ - interfaces for modules
|
||||
|
||||
module_dir/ - implementation of module. Each module must have a short
|
||||
description of what it does and a Makefile that will describe what
|
||||
libraries it uses and other important configuration
|
|
@ -1,63 +0,0 @@
|
|||
I. Introduction
|
||||
---------------
|
||||
|
||||
Framebuffer
|
||||
-----------
|
||||
|
||||
The framebuffer is a hardware device that is capable of displaying a buffer of
|
||||
memory on the screen. The framebuffer has 80 columns and 25 rows. We can
|
||||
communicate with it through a memory mapped I/O address and we can consider that
|
||||
it is an array of size 80x25. Its starting address is defined in screen.h as
|
||||
FBUFFER_START_ADDR.
|
||||
|
||||
This module handles the communication with this framebuffer so that we can
|
||||
display text on the screen.
|
||||
|
||||
Format of Framebuffer cells
|
||||
---------------------------
|
||||
|
||||
The memory is divided into 16 bit cells that encapsulate the character and its
|
||||
attributes. The character is placed in the right most 8 bits and the attributes
|
||||
in the left most 8 bits. (if we consider the format where LSB is on the left and
|
||||
MSB is on the right)
|
||||
|
||||
To encode the character ASCII codes are used.
|
||||
|
||||
The attribute bits are divided as follows: the left most 4 bits are for
|
||||
background color, while the right most 4 bits are used for foreground color.
|
||||
|
||||
Depending of the mode setup, attribute bit 7 may be used for blinking thus
|
||||
only 3 bits remain for background color. Attribute bit 3 may be used for
|
||||
foreground intensity. Attribute bit 0 may be used for underline.
|
||||
|
||||
Cursor
|
||||
------
|
||||
|
||||
Moving the cursor on the framebuffer is done via two different I/O ports. The
|
||||
cursor position is a 16 bit integer that must be sent to a 8 bit I/O port.
|
||||
We do that in two turns.
|
||||
|
||||
First, we send a byte to the command port that tells it to receive the highest
|
||||
8 bits of the position, then we send the byte to data port.
|
||||
Second, we send another byte to the command port that tells it to receive the
|
||||
lowest 8 bits of the position. then we send the byte to data port.
|
||||
|
||||
The above mentioned ports are defined as macros in include/cursor.h. The
|
||||
command bytes are defined in the same header.
|
||||
|
||||
II. Implementations
|
||||
------------------
|
||||
|
||||
The reference code for this section can be found in screen.h and screen.c.
|
||||
There are two main operation to perform: screen_init and screen_write.
|
||||
|
||||
screen_init will initiate the screen by filing the framebuffer with whitespaces
|
||||
(ASCII character 0x20).
|
||||
|
||||
screen_write will put characters on the screen and will update the cursor too.
|
||||
|
||||
III. Further work
|
||||
-----------------
|
||||
|
||||
Maybe I will also implement a way to disable/enable blinking by accessing
|
||||
specific I/O addresses.
|
Loading…
Reference in New Issue