summaryrefslogtreecommitdiff
path: root/boot/disk_load_16.asm
blob: 3d0951dfca5bbf54c6dffba9fb3acf4f9f89d6a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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