AGAIN! ABOUT PMODE IN FREEPASCAL

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.
Post Reply
RodrigoFagner

AGAIN! ABOUT PMODE IN FREEPASCAL

Post by RodrigoFagner »

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!!! :-)

MANY TANKS

RODRIGO FAGNER!
ASHLEY4

RE:AGAIN! ABOUT PMODE IN FREEPASCAL

Post by ASHLEY4 »

HI
Most people on here do not use freepascal,so you are better off asking here:

      http://www.friends-of-fpc.org/

ASHLEY4.
RodrigoFagner

RE:I saw fpc and gnu pascal doe´s the same way! it put the f

Post by RodrigoFagner »

i am bored cuz my hole life i use bp7 and it is easy to use!
but ! you know ! ASHLEY4! :-) many tanks! if you know with GPC please help me?

;-)
RodrigoFagner
ASHLEY4

RE:I saw fpc and gnu pascal doe´s the same way! it put the f

Post by ASHLEY4 »

I only use ASM, "THE  LANGUAGE for MEN", the rest of the languages are for boys and girls.

ASHLEY4.
Anton

RE:I saw fpc and gnu pascal doe´s the same way! it put the f

Post by Anton »

Well, i guess these men don't have anything else to do(!), but sit in front of the computer, whereas girls and boys have time for other things. :)
Anton.
jmpnop

damn straight

Post by jmpnop »

In what other language can you mix data and code
in order to perform instructions not supported by the compiler?
uri

RE:I saw fpc and gnu pascal doe´s the same way! it put the f

Post by uri »

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.

- uri
Post Reply