| 1. If you look through the commit history, you'll see that the first implementation was actually with Pascal strings. Printing with Pascal strings is actually shorter (you skip the null test, basically), but constructing Pascal strings to pass as an argument when they are not constants yielded much more code to prepare for that call. Had I had more leeway, I would have used Pascal strings, it much less headache. 2. Files in `/bin` all include from the SDK. You can pretty much do the same for utility functions. The includes, at least in nasm, are very much like copy-pasted code (or includes in C for that matter), and then you can just jump/call to the label. I did not do it because I haven't been able to get nasm to optimize away the code that I don't use, and I didn't want to bloat the binaries or make a file for a 5LOC function. All in all not good reasons in general, but it made sense to me in this context. |
Two more questions if you find some spare time:
3. Why does it use tty for interrupts instead of directly calling int 10?
4. How does this even print to the screen or use a tty in the first place? Is it just something inherent in bios api?