summaryrefslogtreecommitdiff
path: root/bootloader/printIntBios.asm
diff options
context:
space:
mode:
authormanzerbredes <loic.guegan_secondary@yahoo.fr>2015-07-19 09:19:58 +0400
committermanzerbredes <loic.guegan_secondary@yahoo.fr>2015-07-19 09:19:58 +0400
commit37e7a5d80b88d29ae1b76fc6efc9f0b819c18c02 (patch)
treef8b82f4ed1e2eb441f66d9c248b2d87b46fafc0f /bootloader/printIntBios.asm
parentcef56790ea642c4308e34c280508fdcc63a313f0 (diff)
parenta49a53e48af9bdf64fee43c3772cb654ceb8e6ab (diff)
Solve conflicts
Diffstat (limited to 'bootloader/printIntBios.asm')
-rw-r--r--bootloader/printIntBios.asm27
1 files changed, 27 insertions, 0 deletions
diff --git a/bootloader/printIntBios.asm b/bootloader/printIntBios.asm
new file mode 100644
index 0000000..2a6c735
--- /dev/null
+++ b/bootloader/printIntBios.asm
@@ -0,0 +1,27 @@
+printIntBios:
+
+ ;Save registers
+ push ax
+ push bx
+
+ ;Print loop
+ .loop:
+
+ mov ah, 0x0E ;Use 0xE bios service for teletype print
+ lodsb ;Load char in al and inc SI register
+ cmp al, 0x0 ;Check if we print all the chain
+ je .end ;If yes go to end
+
+ mov bl, 0x0F ;Else set color register
+
+ int 0x10 ;And print the character
+
+ jmp .loop ;Go to the next character
+ .end:
+
+ ;Restore registers
+ pop bx
+ pop ax
+
+ ;Back to previous task
+ ret