Skip to content

Commit e4e4567

Browse files
Support a bigger kernel file in stage2 bootloader (#2)
Support loading a kernel file of up to 249KB in size by moving the stack farther away from the kernel file buffer.
1 parent dfc0e94 commit e4e4567

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

stage2_bootloader/boot2.asm

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,11 @@ entry_point:
3535
mov ds, ax
3636
mov es, ax
3737

38-
;=====================================================HOTFIX============
39-
; mov ss, ax
40-
; mov sp, 0xFFFF ; stack begins at 0xffff (downwards)
41-
42-
; stack bei 0000:FFFF ?
43-
44-
mov ax,0x1000
45-
mov ss,ax
46-
xor sp,sp
47-
dec sp
48-
;=====================================================HOTFIX============
38+
mov ax, 0x3000 ; stack begins at 0x3FFFF (downwards)
39+
mov ss, ax
40+
mov sp, 0xFFFF
4941

50-
sti ; enable interrupts
42+
sti ; enable interrupts
5143

5244
A20:
5345
call EnableA20

0 commit comments

Comments
 (0)