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?
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?
3. The tty interrupt advances the cursor along with printing. So, once again, I do it to save on some instructions. In the first iterations I wanted to retain more control (by printing and moving as separate operations) so that I could reuse this across the board, but eventually I ran out of space.
4. I am relying heavily on BIOS interrupts, which are criminally underdocumented. The most reliable source is Ralph Brown's documentation[1] which is very far from what I was expecting to be authoritative documentation. Turns out this collection is really good and basically _the_ source of truth for BIOS interrupts.
To answer your question, yes, this is basically calling the BIOS API.
https://bitsavers.trailing-edge.com/pdf/ibm/pc/ps2/PS2_and_P...
Complete with reference assembler source code.