Tasm with free pascal

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
System123
Member
Member
Posts: 196
Joined: Mon Jul 07, 2008 1:25 am

Tasm with free pascal

Post 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'
Gizmic OS
Currently - Busy with FAT12 driver and VFS
User avatar
inflater
Member
Member
Posts: 1309
Joined: Thu Sep 28, 2006 10:32 am
Location: Slovakia
Contact:

Re: Tasm with free pascal

Post 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.
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English :P)
System123
Member
Member
Posts: 196
Joined: Mon Jul 07, 2008 1:25 am

Re: Tasm with free pascal

Post 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.
Gizmic OS
Currently - Busy with FAT12 driver and VFS
User avatar
inflater
Member
Member
Posts: 1309
Joined: Thu Sep 28, 2006 10:32 am
Location: Slovakia
Contact:

Re: Tasm with free pascal

Post by inflater »

Well, if you convert it to NASM (properly), you can be 100% sure it will work.
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English :P)
Post Reply