Added kernel disk reading test

This commit is contained in:
Lucia Ceionia
2022-09-19 19:46:26 -05:00
parent 606fc37e37
commit 8c309c6d9f
3 changed files with 60 additions and 24 deletions

View File

@@ -51,6 +51,27 @@ mov ax, 0x13
int 0x10
int 0x30
jmp $
global v86TextMode
v86TextMode:
mov ax, 0x3
int 0x10
int 0x30
jmp $
global v86DiskRead
v86DiskRead:
xor ax, ax ; TODO fix assuming we're in first 64k
mov ds, ax
mov ah, 0x42
mov dl, 0x80 ; TODO get this from BIOS or something
mov si, v86disk_addr_packet ; ds:si
int 0x13
int 0x30
jmp $
v86disk_addr_packet:
db 0x10, 0x00 ; size, reserved
dw 0x20 ; blocks
dd 0x23000000 ; transfer buffer 0x23000
dq 0 ; start block
[BITS 32]
; extern void enter_v86(uint32_t ss, uint32_t esp, uint32_t cs, uint32_t eip);
global enter_v86