]> wirehaze git hosting - BOS.git/blobdiff - kernel/16bit/init16bit.asm

wirehaze git hosting

Some more source cleaning
[BOS.git] / kernel / 16bit / init16bit.asm
index 652cfb1c92346240df69ad2261f6bb38a7aff9ba..4815455af1b8a265ecd71388ffd901aaa79dc654 100755 (executable)
 ;    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
@@ -29,7 +29,7 @@ init16bit:
         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