forked from PoliEcho-holding-org/kern
MAJOR REWRITE
- Kernel got pretty much deleted, will be rewriting in following days - Bootloader got rewritten, stage1 works, stage2 will be written in following days - Libc is still the same - User will contains userspace stuff - Rewrote makefiles again - Got rid of backup (see previous commits for that) - Image has 1 MBR partition for FAT32 which contains 'kern.bin' file - Remade info files to be more "big project" style (all caps plain text) - Added some dumb docs
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
; Reads sectors from disk
|
||||
; eax - LBA
|
||||
; cx - Sector count
|
||||
; dl - Drive number
|
||||
; es:dx - Destination
|
||||
read_sectors:
|
||||
pusha
|
||||
|
||||
; Fill out Disk Address Packet
|
||||
mov si, .da_packet
|
||||
mov word [si], 0x10 ; Packet Size and Unused
|
||||
mov word [si+2], cx ; Sector count
|
||||
mov word [si+4], bx ; Dest. offset
|
||||
mov word [si+6], es ; Dest. segment
|
||||
mov dword [si+8], eax ; LBA
|
||||
|
||||
mov ah, 0x42 ; Extended read
|
||||
clc ; Clear CF
|
||||
int 0x13
|
||||
.done:
|
||||
popa
|
||||
ret
|
||||
|
||||
; Disk Address Packet
|
||||
.da_packet: equ 0x8000
|
||||
|
||||
Reference in New Issue
Block a user