-
Notifications
You must be signed in to change notification settings - Fork 1
/
gameros.asm
executable file
·64 lines (41 loc) · 1.13 KB
/
gameros.asm
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
; Copyright © 2013 - 2021 by Brett Kuntz. All rights reserved.
include gameros.inc
boot:far_jmp 07C0h, @F
; ##########################################################################
@@: intro
clrscr
call loadkernel
dbgout "Kernel Load Failure"
halt
; ##########################################################################
loadkernel proc
local currdrv:byte
mov currdrv, 0
.repeat
mov ah, 0
mov dl, currdrv
int 13h
mov bx, KERNEL_ADDR
mov dword ptr [bx], 0
mov ah, 2
mov al, SECTOR_COUNT
mov cx, 2
mov dh, 0
mov dl, currdrv
int 13h
.if !carry?
mov eax, ds:[KERNEL_ADDR]
mov ecx, ds:[BINARY_SIZE - 4]
.if eax == IMAGE_TAG && ecx == FOOTER_TAG
call main
reboot
.endif
.endif
inc currdrv
.until currdrv == 0
ret
loadkernel endp
; ##########################################################################
BOOT_FOOTER
include main.asm
end boot