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]
3rd exception error
Re:3rd exception error
This is the bkos.s file generate by free pascal
[attachment deleted by admin]
[attachment deleted by admin]
Re:3rd exception error
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
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
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
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