summaryrefslogtreecommitdiff
path: root/bootloader.asm
diff options
context:
space:
mode:
Diffstat (limited to 'bootloader.asm')
-rw-r--r--bootloader.asm13
1 files changed, 7 insertions, 6 deletions
diff --git a/bootloader.asm b/bootloader.asm
index c9ed98b..7d218eb 100644
--- a/bootloader.asm
+++ b/bootloader.asm
@@ -13,7 +13,7 @@ start:
call verify_read
mov si, READ_NERR
call write_str
- jmp 0x7e00
+ jmp word [0x7dfc]
jmp hang
read_err:
@@ -23,17 +23,18 @@ hang:
jmp hang
verify_read:
+ mov bx, word [0x7dfc]
mov al, 0x66
- cmp al, [0x7e00]
+ cmp al, byte [bx]
jne read_err
mov al, 0x55
- cmp al, [0x7e01]
+ cmp al, byte [bx+1]
jne read_err
mov al, 0x66
- cmp al, [0x7e02]
+ cmp al, byte [bx+2]
jne read_err
mov al, 0x89
- cmp al, [0x7e03]
+ cmp al, byte [bx+3]
jne read_err
ret
@@ -106,7 +107,7 @@ LBA_DISK_READ_PACKET:
db 0x10
db 0
dw 32 ; number of blocks to read, reset to # actually read when done
- dw 0x7e00 ; read destination address
+ dw 0x7dfc ; read destination address
dw 0x0000
dd 1 ; lba to read from
dd 0 ; for extended lba adresses (not really used here)