Simple Operating System
Todo List
Member __printf (int a)
do it with dll
Member exit (int val)
to it as OS interruption
File file.h
remove FILE as pointer
File fs.h
better handle disk errors see info.c, check if CF is set after reading/writing
Member getMemorySize (void)
get RAM size above first 1MB with int 0x15 AH=0x88, see info.com
File graphics.h

add .bmp pl.wikipedia.org/wiki/Windows_Bitmap

add get window height and window length

Member int0x21 (interruptFrame *frame)
change order of ah
Member interruptFrame
IDK how to use them, they are required by GCC to use __int, see todo in interrupts.asm
File interrupts-asm.c
divZero is error handle, not only zero division https://gcc.gnu.org/onlinedocs/gcc/x86-Function-Attributes.html#x86-Function-Attributes see error code
File io.h
add cursorColor and setCursorColor(Color color)
Member load (beginSector, track, parameter, size, segment)

add sys_exec(int filename)

add sys_exit(int code) as subprogram

add check if in code is 8E = change of sreg or EA = jmpf and then don't execute

change call far on jmp far and iret to push 0; push callerAddress; push DWORD[0x8]; iret

add pages int 10h AH=5

split it to loading and executing

add to programsMap program's properties

Member NULL
Make 0th Byte always zero for safety reason
Member open (int filename, int mode)
add modes, see sys_write() todo
Member SECTORS_PER_TRACK
to avoid breaking file into tracks see sys_create()
File stdlib.h
change name to not be mismatched with stdlib.h
Member sys_create (const int filename, size_t size)

file must be all in one track, change it

add it to sys_open when file wasn't found

Member sys_write (Byte id, int ptr, size_t size)
add modes, when append when override
Member timer (struct interruptFrame *frame)
It should switch between processes, add multithreading
Member TRACKS_MAX
do it dynamically