Page 1 of 1

3rd exception error

Posted: Tue Jan 28, 2003 5:26 pm
by cobrab
I have a .asm file to pass to pmode, and a kernel in Free Pascal.

When I execute the file generate for the .asm in bochs works fine.

But when I execute the file generate by .asm and the pascal kernel, the program generate a 3er exception. and the bochsout.txt indicate something like that:

jump_protected: gate type 0 unsupported
>>panic<< exception(): 3rd exception with no resolution
CS.d_b = 16 bit
SS.d_B = 16 bit

EAX=60000011
EBX=00000000
ECX=00000001
EDX=00000000
ESP=0000fffe
EBP=00000000
ESI=00000000
EDI=0000ffe4

Any Idea.

Prueba.asm is the program to pass to pmode and call pascal_main

[attachment deleted by admin]

Re:3rd exception error

Posted: Tue Jan 28, 2003 5:30 pm
by cobrab
This is the bkos.s file generate by free pascal

[attachment deleted by admin]

Re:3rd exception error

Posted: Tue Jan 28, 2003 5:35 pm
by cobrab
And this is the loader.asm file. (I create this file becouse if I not declare this function, I have an error whit LD).

global FPC_INITIALIZEUNITS
global FPC_DO_EXIT
global INIT$$SYSTEM

extern program_init


INIT$$SYSTEM:

start:

ret

FPC_INITIALIZEUNITS:
ret

FPC_DO_EXIT:
ret




I generate the binary file in this forms:


ppc386 bkos.pas -Cn -a -Rintel
nasm prueba.asm -f aout -o prueba.o
nasm loader.asm -f aout -o loader.o
ld prueba.o loader.o bkos.o --oformat binary -o kernel.img

Re:3rd exception error

Posted: Wed Jan 29, 2003 1:14 pm
by cobrab
I solve the problem :

I load the kernel in this form:

ld prueba.o loader.o bkos.o --oformat binary -o kernel.img

but i need to load:

ld prueba.o loader.o bkos.o --oformat binary -o kernel.img -text 0x7c00