Turbo C and assembler pt. 2

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
zxmaster

Turbo C and assembler pt. 2

Post by zxmaster »

I have begun a rewrite of my OS in mixed C and assembler. I have written a bootloader capable of loading dos EXE (I think :)
I use Turbo C for compiling, nasm for assembler and Tlink for linking.

To test the loader I am trying to write a small program that just writes a "H" to the screen using an assembler function called printch. I have previously tested this function.
The thing is when I write the following code:

extern int printch();

int main()
{
printch();
return 0;
}

Compiles and links it into an exe nothing works. It should be executable by the NT dosbox, but it complains of illegal instruction.
The only warning I get is from Tlink which says:
Warning: no stack.

I think that is weird since the compiler ought to take care of that. I would really appreciate any help on this.
Post Reply