summaryrefslogtreecommitdiff
path: root/bootloader/clearScreenIntBios.asm
diff options
context:
space:
mode:
authormanzerbredes <loic.guegan_secondary@yahoo.fr>2015-07-18 10:23:36 +0400
committermanzerbredes <loic.guegan_secondary@yahoo.fr>2015-07-18 10:23:36 +0400
commit9d2b511fd521fc61ed2eb6f0fc5ed23252ac3190 (patch)
tree2b74dd0c8bd575f009c1e255bc133ca84e0be674 /bootloader/clearScreenIntBios.asm
parent707d7e38b6c3da23e99e9cbf9ad3c0cd27459c90 (diff)
Add some bios routines
Diffstat (limited to 'bootloader/clearScreenIntBios.asm')
-rw-r--r--bootloader/clearScreenIntBios.asm30
1 files changed, 30 insertions, 0 deletions
diff --git a/bootloader/clearScreenIntBios.asm b/bootloader/clearScreenIntBios.asm
new file mode 100644
index 0000000..4739430
--- /dev/null
+++ b/bootloader/clearScreenIntBios.asm
@@ -0,0 +1,30 @@
+clearScreenIntBios:
+
+ ;Save registers
+ push ax
+ push bx
+ push cx
+ push dx
+
+ mov ax, 0x0600 ;Clear
+ mov bx, 0x0F00 ;Color black behind white foreground
+
+ mov cx, 0x0000 ;Top left corner
+ mov dx, 0x5050 ;Bottom right corner 80x80
+
+ int 0x10 ;Clear the screen
+
+ ;Restore registers
+ pop dx
+ pop cx
+ pop bx
+ pop ax
+
+ ;Reset Cursor Position
+ call resetCursorPosIntBios
+
+ ;Back to previous task
+ ret
+
+;Include resetCursorPosIntBios
+%include "resetCursorPosIntBios.asm"