This repository was archived by the owner on Jun 28, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Current kernel api
Kolya edited this page Mar 1, 2025
·
4 revisions
(SYSFUNCTION) - already called by system public function
./kernel - full code
./kernel/build - build elf objects
./kernel/include - headers
./usercode/code/ - User Program code
U0 TTYClear(); // Clear screen
Bool TTYRawPrint(Char c, VgaColor fg, VgaColor bg); // Put char <c> with foreground <fg> and background <bg>
U0 TTYPrintC(Char c); // Put ascii+ char
U0 TTYUPrintC(Char c); // Put mezex char
U0 TTYPrint(String s); // Print ascii+ text
U0 TTYUPrint(String s); // Print mezex text
U0 TTYUPrintHex(U32 i); // Print 32 bit unsigned variableU0 KDogWatchInit(); // Init DogWatch (SYSFUNCTION)
U0 KDogWatchTick(); // Update DogWatch (SYSFUNCTION)
U0 KDogWatchLog(const String str, Bool panic); // Log using DogWatch
U0 KDogWatchPStart(U8 id, const String name); // Start DogWatch Profile with name <name> and id <id>
U0 KDogWatchPTick(U8 id); // Update DogWatch Profile
U0 KDogWatchPEnd(U8 id); // Stop DogWatch Profileextern Ptr SysCallT[256]; // SysCall callable table
U0 SysCallSet(Ptr func, U8 addr); // Set SysCall
U0 SysCallInit(); // Init Syscall (SYSFUNCTION)SysCall can be called using this code:
mov al, <syscall id>
int 0x78ACS - Amazing C String library
FDL - Fast Decimal Logarithm
Collects - Simple Collections(FIFO, List, ...)
bosyos/kernel/
├── arch
│ ├── beep.c
│ ├── fpu.c
│ ├── gdt.c
│ ├── getreg.c
│ ├── halt.c
│ ├── idt.c
│ ├── io.c
│ ├── pic.c
│ ├── poweroff.c
│ ├── reboot.c
│ └── ring3.s
├── build
│ └── KMain.o
├── build.py
├── drivers
│ ├── ide.c
│ ├── keyboard.c
│ ├── mouse.c
│ ├── pit.c
│ ├── rtl8139.c
│ ├── rtl8139.s
│ ├── serial.c
│ └── vga.c
├── fs
│ ├── BOTFS.c
│ ├── ufs.c
│ └── vfs.c
├── include
│ ├── arch
│ │ ├── beep.h
│ │ ├── cpu.h
│ │ ├── fpu.h
│ │ ├── gdt.h
│ │ ├── getreg.h
│ │ ├── idt.h
│ │ ├── io.h
│ │ ├── pic.h
│ │ ├── ring3.h
│ │ └── sys.h
│ ├── drivers
│ │ ├── ide.h
│ │ ├── keyboard.h
│ │ ├── mouse.h
│ │ ├── pit.h
│ │ ├── rtl8139.h
│ │ ├── serial.h
│ │ └── vga.h
│ ├── fs
│ │ ├── BOTFS.h
│ │ ├── ufs.h
│ │ └── vfs.h
│ ├── kernel
│ │ ├── KDogWatch.h
│ │ ├── KMem.h
│ │ ├── KPanic.h
│ │ └── KTasks.h
│ ├── lib
│ │ ├── ACS.h
│ │ ├── ASCIIP.h
│ │ ├── BosZ.h
│ │ ├── Collects.h
│ │ ├── DAT.h
│ │ ├── FDL.h
│ │ ├── Graphics.h
│ │ ├── Hash.h
│ │ ├── IP.h
│ │ ├── KeyboardLib.h
│ │ ├── MemLib.h
│ │ ├── Random.h
│ │ ├── String.h
│ │ ├── Time.h
│ │ ├── TTY.h
│ │ └── Types.h
│ └── misc
│ ├── bsfexe.h
│ ├── driverreg.h
│ ├── syscall.h
│ ├── vdrivers.h
│ ├── vfiles.h
│ └── wordgen.h
├── kernel
│ ├── KDogWatch.c
│ ├── KMain.c
│ ├── KMem.c
│ ├── KPanic.c
│ └── KTasks.c
├── kernel.b
├── lib
│ ├── ACS.c
│ ├── Bosz.c
│ ├── Collects.c
│ ├── DAT.c
│ ├── FDL.c
│ ├── Graphics.c
│ ├── Hash.c
│ ├── IP.c
│ ├── KeyboardLib.c
│ ├── MemLib.c
│ ├── Random.c
│ ├── String.c
│ ├── syscall.c
│ ├── Time.c
│ └── TTY.c
├── link.ld
└── misc
├── bsfexe.c
├── driverreg.c
├── font.c
├── syscalls.c
├── vdrivers.c
├── vfiles.c
└── wordgen.c