![]() |
| ||
| Turbo C Fixup Error Hi, Im writing a program in Turbo C but i also want to use some assembly functions, for this im using nasm. This is my assembly code: BITS 16 And here is my Turbo C code: extern int Add4(int); Im linking this way: nasm -o asmmodule.obj -f obj asmmodule.asm tcc -mt -c cmodule.c tlink cmodule.obj asmmodule.obj But tlink gives me the following error: Fixup overflow in module CMODULE.C at _TEXT:000B, target = _ADD4 Anyone knows how to fix this? |
| ||
| Re: Turbo C Fixup Error Seems to be a common problem, only explained in some usenet news threads. You don't seem to have any segments declared in your ASM code. Try putting this just above your assembly function definition: SEGMENT _TEXT PUBLIC CLASS=CODE USE16 ALIGN=16 In addition, I'd suggest putting the following above your single variable declaration: SEGMENT data For a more thorough discussion, search "google groups" (USENET news, really) with the following query: nasm "Fixup overflow" borland The thread I'm referring to has the following subject: Help linking a (trivial) NASM object file (.obj) with Borland C++ 3.0 Nice to know that others are still playing with Borland C for DOS + NASM, just like I do :-)) |
| All times are GMT -4. The time now is 10:25 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC