Page 1 of 1
Tasm with free pascal
Posted: Tue Jul 29, 2008 6:28 am
by System123
I have part of my graphics code programmed in tasm. The code works fine when i use borland pascal. However it does not work with free pascal. I then copied the code from my asm file and created procedures in free pascal code with it. However free pascal then crashes on compile with the error code '291'
Re: Tasm with free pascal
Posted: Tue Jul 29, 2008 7:56 am
by inflater
You're mixing 16-bit and 32-bit modes again, mate. Borland Pascal is 16-bit and it's TASM is 16-bit unless with a DOS extender, which is useless to you. TASM generates only OMF files (16-bit) and freepascal's toolchain (or any gnu open source tools) can't comply with that kind of object files. And, Free Pascal is 32-bit.
Anyways your graphics routines WON'T work in free pascal unless you rewrite them to protected mode environment.
Re: Tasm with free pascal
Posted: Tue Jul 29, 2008 1:18 pm
by System123
You can code tasm in 32bit mode. There is a tasm32 compiler. And even when i have converted the code into inline asm code it still wont compile. I get the same error. I will still try converting to nasm code and linking it in.
Re: Tasm with free pascal
Posted: Tue Jul 29, 2008 1:36 pm
by inflater
Well, if you convert it to NASM (properly), you can be 100% sure it will work.