ROSE/entry.nasm

28 lines
364 B
NASM
Raw Normal View History

2022-09-14 16:50:44 -05:00
global entry
entry:
lgdt [gdt_desc] ; load gdt register
jmp 08h:Pmodecode
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
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