aboutsummaryrefslogtreecommitdiff
path: root/diskio.asm
diff options
context:
space:
mode:
Diffstat (limited to 'diskio.asm')
-rw-r--r--diskio.asm21
1 files changed, 21 insertions, 0 deletions
diff --git a/diskio.asm b/diskio.asm
new file mode 100644
index 0000000..fa1524c
--- /dev/null
+++ b/diskio.asm
@@ -0,0 +1,21 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Reset the disk system
+;; DL must be disk to reset
+diskio_ResetDiskSystem:
+ pop ax
+ pop dx
+ push ax
+ xor ah, ah
+ int 0x13
+ ret
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+diskio_DumpBootSector:
+ xor bx, bx
+ mov es, bx
+ mov bx, diskio_SectorBuffer ; ES:BX = address
+ mov dl, [Drive] ; DL = Drive number
+ mov ah, 2 ; AH = Read command
+ int 0x13 ; Read sector
+ push diskio_SectorBuffer
+ call OutText
+ ret