Source file descriptions: Difference between revisions
No edit summary |
No edit summary |
||
Line 64: | Line 64: | ||
config.h contains definitions providing text replacements for magic numbers. | config.h contains definitions providing text replacements for magic numbers. | ||
=== io.asm === | |||
io.asm contains the low level assembly routines we call from C to communicate directly with hardware ports. This includes outb, outw, insb, and insw. | |||
=== io.h === | |||
Include io.h to access the in and out functions defined in io.asm. |
Revision as of 20:19, 26 April 2023
This page provides a list of source files that make up the Dexter kernel and provides a brief description of each. This page is a work in progress.
src/fs
disk.c
disk.c is the low level disk functions to initialize the disk devices and read from individual disk sectors.
disk.h
disk.h should be included to use the disk functions in the disk.c file. It also contains definitions for the disk struct type and DEXTER_DISK_TYPE.
file.c
file.c provides functions required for initializing and interacting with file systems at the vfs level. These functions are independent of any specific file system implementation.
file.h
file.h contains the structure definitions for a filesystem and file_descriptor as well as important typedef declarations. Header should be included to call non-static functions in file.c.
pathparser.c
pathparser.c contains functions for parsing file paths by the internal file system.
pathparser.h
pathparser.h contains function and struct declarations for pathparser.c.
src/lib
console.c
console.c is where you'll find functions to initialize the text console as well as writing to the screen. The print and cprint functions are the current preferred way to write to the console.
console.h
console.h should be included to use the terminal functions in the console.c file. It also defines VGA_HEIGHT and VGA_WIDTH.
string.c
string.c provides a minimal set of string manipulation functions. This set of functions will grow over time as the need for more string related functions arise.
string.h
Include string.h to use the string manipulation functions in string.c.
src/mem
heap.c
heap.c contains the heap memory implementation including heap creation and utility functions. It also includes versions of malloc and free for allocating and freeing memory on the heap.
heap.h
heap.h needs to be included if you need to allocate memory on the heap. It also contains the heap and heap_table structure definitions.
src/sys
boot.asm
boot.asm contains the assembly code that starts the boot process and changes the CPU from 16-bit real mode to 32-bit protected mode.
config.h
config.h contains definitions providing text replacements for magic numbers.
io.asm
io.asm contains the low level assembly routines we call from C to communicate directly with hardware ports. This includes outb, outw, insb, and insw.
io.h
Include io.h to access the in and out functions defined in io.asm.