; save info ;\r
;---------------------;\r
init16bit:\r
- call getmem ; realmode/mem.inc\r
+ call getmem ; realmode/mem.inc\r
mov [ram_amount], eax\r
\r
xor eax, eax ; clear mem for IDT and GDT\r
- mov edi, 0x6c00 ; IDT address\r
- mov ecx, (0x800 + 0x800)/4\r
+ mov edi, [idtr.address] ; IDT address\r
+ mov ecx, ([idtr.size] + [idtr.size])/4\r
rep stosd\r
\r
mov eax, cs\r
mov [gdt.BOS_16data + 7], ah\r
\r
lea esi, [gdt]\r
- mov edi, 0x7400 ; GDT address\r
+ mov edi, [gdtr.address] ; GDT address\r
mov ecx, (gdt_end - gdt)/4\r
rep movsd ; Move it to final pos.\r
\r