Implementing a basic x86 page frame allocator in C (anastas.io) 65 points by adamnemecek 10y ago ↗ HN
[–] colejohnson66 10y ago ↗ Minor nitpick: `kernel_main' needs to be declared as cdecl for the assembly call to work.
[–] Kretiini 10y ago ↗ 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'? [–] pjmlp 10y ago ↗ 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...
[–] pjmlp 10y ago ↗ 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...
3 comments
[ 2.1 ms ] story [ 19.7 ms ] threadhttps://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...