miniOS.txt 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. WIP
  2. PLATFORM INDEPENDENT MINI OS
  3. This should be a very simple CC0 OS written in C, independent of any specific
  4. platform, to run on Arduboy, Pokitto etc., with programs compiled into the
  5. executable binary, so that everyone compiles their own small OS with their own
  6. set of programs.
  7. source files:
  8. core.h:
  9. - OS core
  10. - microkernel, everythig in programs
  11. - 8 bit only, with wider types implemented as multiple bytes + functions
  12. - will NOT provide any text or graphical shell, these will be normal programs
  13. - will provide syscalls for the programs to make:
  14. - list files
  15. - open file
  16. -
  17. - "everything is a file" philosophy, so that there will only be a few syscalls
  18. (open file, write file, read file, ...)
  19. - will abstract and manage:
  20. - simple file system:
  21. - no directories, just files on the same level
  22. - a file in memory is save as:
  23. <n0: length of block 0> <n0 bytes> <n1: length of block 1> ...
  24. - the first file is special: the file index, but is accessed the same way
  25. as any other file, the file contains these bytes:
  26. <file 0 name> <32 bit address of file 0> <file 1 name> ...
  27. - HW devices:
  28. - as dev files
  29. - processes and non-preemptive multitasking:
  30. - each program will provide a "step" function which the core will be
  31. calling cyclically
  32. -
  33. - networking?
  34. main_*.c:
  35. - small main glue code, specific for each platform (e.g. SDL, bare metal, ...)
  36. - has to implement core's API:
  37. -
  38. -
  39. -
  40. program_*.h:
  41. - programs to be compiled in and included in the final binary
  42. - have to implement these API things:
  43. - step() function, performs the next "short" program step (non-preemtive
  44. multitasking)
  45. - halt() function, called before terminating the process
  46. basic programs to write:
  47. - text shell, language and interpreter
  48. - core utils (ls, mv, cat, ...)
  49. - graphical shell, a "simple desktop"
  50. - games