summaryrefslogtreecommitdiff
path: root/boot/disk_load_16.asm
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-08-27 14:43:16 +0200
committerMichal Idziorek <m.i@gmx.at>2014-08-27 14:43:16 +0200
commit62c211ade1606d82f9b262b68ef074ae07e26184 (patch)
treec819565b6f22f75b35fedec6e6eb5e0ec200c5d9 /boot/disk_load_16.asm
parent2d20d0d1f720e064b29aa3578aa33b5146a954e5 (diff)
boot directory cleanup continued
Diffstat (limited to 'boot/disk_load_16.asm')
-rw-r--r--boot/disk_load_16.asm26
1 files changed, 26 insertions, 0 deletions
diff --git a/boot/disk_load_16.asm b/boot/disk_load_16.asm
new file mode 100644
index 0000000..3d0951d
--- /dev/null
+++ b/boot/disk_load_16.asm
@@ -0,0 +1,26 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;; Miguel's FoolOS Helper Functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;
+;disk_load
+;
+
+[bits 16]
+
+
+;disk_load routune (load dh sectors from drive dl to es:bx)
+disk_load:
+
+ pusha
+
+ mov ah,0x02 ;BIOS read sector func
+ mov al,dh ;read dh sectors (amount)
+ mov ch,0x00 ;cyl 0
+ mov dh,0x00 ;head 0
+ mov cl,0x02 ;start at sector 2
+
+ int 0x13 ;bios interrupt
+
+ popa
+ ret
+