Peter Wiehe
2020-04-06 14:33:14 UTC
Hi all!
I use Turbo C.
I have a very small C program and a very small Assembler file.
When I try to link them together to an EXE file, there comes an error:
"Fixup overflow". This happens with the memory models "tiny" and "small".
With the models medium, large and huge, when I run the linked program, I
get the error "Invalid opcode ..."
---------My C code:--------
extern printChar(char c);
main()
{
printChar('+');
while(1){;}
}
--------------------------
---------My Asm code:-----
section code
global _printChar
_printChar: mov al, '+'
mov ah, 0x0E
mov bx, 7
int 0x10
ret
section data
--------------------------
What can I do to solve this error?
(And please note, that I'm aware that the argument for printChar is
ignored. I'm just building it up, step by step).
I use Turbo C.
I have a very small C program and a very small Assembler file.
When I try to link them together to an EXE file, there comes an error:
"Fixup overflow". This happens with the memory models "tiny" and "small".
With the models medium, large and huge, when I run the linked program, I
get the error "Invalid opcode ..."
---------My C code:--------
extern printChar(char c);
main()
{
printChar('+');
while(1){;}
}
--------------------------
---------My Asm code:-----
section code
global _printChar
_printChar: mov al, '+'
mov ah, 0x0E
mov bx, 7
int 0x10
ret
section data
--------------------------
What can I do to solve this error?
(And please note, that I'm aware that the argument for printChar is
ignored. I'm just building it up, step by step).
--
Greetings
Peter Wiehe
Greetings
Peter Wiehe