; AL = Character BIOS_WriteTTYChar: ;MOV AL, [0] MOV AH, 0Eh INT 10h RET BIOS_SetVideoMode13H: CMP BYTE [CurrentVideoMode], 0x13 ; Prevent a switch if we're already mode 13. ; This prevents clearing the framebuffer if clearing wasn't intended JE .already MOV AX, 0x0013 INT 10h MOV BYTE [CurrentVideoMode], 0x13 .already: RET BIOS_SetVideoMode03H: CMP BYTE [CurrentVideoMode], 0x03 ; Prevent a switch if we're already mode 03. ; This prevents clearing the framebuffer if clearing wasn't intended, and also whenever ; we show an error in fallback mode, and then call an error handler, the latter will not ; clear the screen by switching from 03 to 03. JE .already MOV AX, 0x0003 INT 10h MOV BYTE [CurrentVideoMode], 0x03 .already: RET