Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Implementing a basic x86 page frame allocator in C (anastas.io)
65 points by adamnemecek on Aug 9, 2016 | hide | past | favorite | 3 comments


Question: isn't printf a C standard library function? How can it be used in an OS with no cstdlib (yet)? Or, is the code in the article 'just a guideline'?


Yes, but it can also be done at kernel level if implemented as such.

https://github.com/shawnanastasio/ShawnOS/blob/4345c74e84c5d...

putchar() makes use of vga_textmode_putchar() which is a driver call:

https://github.com/shawnanastasio/ShawnOS/blob/54be43196e310...


Minor nitpick: `kernel_main' needs to be declared as cdecl for the assembly call to work.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: