real mode segments
Posted: Fri Aug 12, 2005 9:27 am
hi all, my kernel is at 0x1000 and just got 55 sectors big(so if your counting) it just hit my boot code, so i'm working on putting my kernel at 0x10000 but i need segmenting help, i tried:
but bochs says:
what am i doing???
Code: Select all
kernel_load:
mov ax, 0x1
mov es, ax
mov bx, 0x0000 // 0001:0000 should be 0x10000?
mov ax, 1 // start at one
mov cx, 70 // load 70 sectors
call LoadSectors
Code: Select all
00004313789p[CPU ] >>PANIC<< prefetch: RIP > CS.limit
00004313789i[SYS ] Last time is 1123860399
00004313789i[CPU ] real mode
00004313789i[CPU ] CS.d_b = 16 bit
00004313789i[CPU ] SS.d_b = 16 bit
00004313789i[CPU ] | EAX=000a0000 EBX=00000004 ECX=000a0200 EDX=00000000
00004313789i[CPU ] | ESP=0000ffb5 EBP=0000ffd9 ESI=00000000 EDI=0000ffe4
00004313789i[CPU ] | IOPL=0 NV UP DI PL NZ NA PO NC
00004313789i[CPU ] | SEG selector base limit G D
00004313789i[CPU ] | SEG sltr(index|ti|rpl) base limit G D
00004313789i[CPU ] | DS:07c0( 0000| 0| 0) 00007c00 0000ffff 0 0
00004313789i[CPU ] | ES:0001( 0000| 0| 0) 00000010 0000ffff 0 0
00004313789i[CPU ] | FS:0000( 0000| 0| 0) 00000000 0000ffff 0 0
00004313789i[CPU ] | GS:0000( 0000| 0| 0) 00000000 0000ffff 0 0
00004313789i[CPU ] | SS:9000( 0000| 0| 0) 00090000 0000ffff 0 0
00004313789i[CPU ] | CS:c900( 0000| 0| 0) 000c9000 0000ffff 0 0
00004313789i[CPU ] | EIP=00010000 (0000ffff)
00004313789i[CPU ] | CR0=0x60000010 CR1=0x00000000 CR2=0x00000000
00004313789i[CPU ] | CR3=0x00000000 CR4=0x00000000
00004313789i[ ] restoring default signal behavior
00004313789i[CTRL ] quit_sim called with exit code 1