set the tty mode at the beginning instead of keeping setting it at each iteration. It will save some CPU cycles

This commit is contained in:
xiacijie 2019-03-12 22:16:37 -06:00
parent 7aff64740e
commit 064cc21e55

View File

@ -1,5 +1,6 @@
print: print:
pusha pusha
mov ah, 0x0e
; keep this in mind: ; keep this in mind:
; while (string[i] != 0) { print string[i]; i++ } ; while (string[i] != 0) { print string[i]; i++ }
@ -11,7 +12,7 @@ start:
je done je done
; the part where we print with the BIOS help ; the part where we print with the BIOS help
mov ah, 0x0e
int 0x10 ; 'al' already contains the char int 0x10 ; 'al' already contains the char
; increment pointer and do next loop ; increment pointer and do next loop