Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
HI, I AM JUST LEARNIN A PASCAL 32 BITS COMPILERS AND I AM TRYING TO UNDERSTAND HOW PASCAL 32BITS WORKS. IT´S POSSIBLE TO PUT A NEW SYSTEM UNIT! ONLY TO USE A 32BITS INSTRUCTIONS AND POINTERS AND STATEMENTS ! ? ? ?
WHEN I USE FPC XXX.PP -Cn OR GPC DDD.PAS -C IT GENERATES A "O" FILE, AND MY PROBLEM IS WITH LINKER! HOW DO I LINK THE "O" FILE TO A MSDOS EXE FILE !? ? ?
WHEN I DO THIS LIKE: LD XXX.O IT RETURN A ERROR WITH A SIMBOLS!
I DON´T WANT TO BORE ANYONE HERE WITH THIS STUPID QUESTIONS, BUT I AM LERNING AND YOU ARE MY ONLY RESOURCE!!!
Your observation is correct - both GNU Pascal and FPC use a DOS extender. The reason is that both compilers output 32 bit code for execution in protected mode. DOS runs in real mode, so programs who need to run in a 32 bit environment have to switch the CPU to protected mode first. GO32v2 does exactly that.
In other words: If you tell the linker to turn your GPC/FPC object files into a DOS EXE, it has no choice but to put GO32 in front of your code.
If your goal is to write an operating system kernel in Pascal, I'd say: Don't bother with DOS. Link your code into a binary file (using "--oformat binary") and write a bootloader for that.