2022-09-14 16:50:44 -05:00
|
|
|
global entry
|
|
|
|
entry:
|
|
|
|
lgdt [gdt_desc] ; load gdt register
|
2023-02-01 14:18:27 -06:00
|
|
|
jmp 08h:Pmodecode
|
2023-01-31 21:26:43 -06:00
|
|
|
|
|
|
|
extern gdt_desc
|
2022-09-14 16:50:44 -05:00
|
|
|
|
|
|
|
[BITS 32]
|
|
|
|
Pmodecode:
|
|
|
|
mov ax, 0x10 ; set up segments
|
|
|
|
mov ds, ax
|
|
|
|
mov es, ax
|
|
|
|
mov ss, ax
|
2022-09-20 13:13:42 -05:00
|
|
|
mov fs, ax
|
|
|
|
mov gs, ax
|
2022-09-14 16:50:44 -05:00
|
|
|
mov ebp, 0x400000
|
|
|
|
mov esp, ebp
|
|
|
|
mov eax, 0x1f001f00
|
|
|
|
mov ecx, (80*25)/2
|
|
|
|
mov edi, 0xb8000
|
2022-09-14 21:54:59 -05:00
|
|
|
rep stosd ; clear screen
|
2022-09-14 16:50:44 -05:00
|
|
|
call start
|
|
|
|
hlt_loop:
|
|
|
|
hlt
|
|
|
|
jmp hlt_loop
|
|
|
|
|
2022-09-14 21:54:59 -05:00
|
|
|
extern start
|