Turbo C: Difference between revisions

From OSDev.wiki
Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content added Content deleted
m (You can also use bzip on them but we're really talking about Turbo C, not about the tools which can be used to convert MZ executables (if that's even desired).)
(Undo revision 11408 by Love4boobies (Talk) - Destruction of information)
Line 1: Line 1:
{{stub}}
{{stub}}
Turbo C (aka TC) is [http://www.borland.com/ Borland's] 16-bit C compiler. In OS development, it is only useful for developing real mode operating systems. TC compiles to a [[MZ]] executable.
Turbo C (aka TC) is [http://www.borland.com/ Borland's] 16-bit C compiler. In OS development, it is only useful for developing real mode operating systems. TC normally compiles to a DOS .exe executable, but the generated code can be turned into a flat binary by [[exe2bin]] if you compile with the -mt (model tiny) argument to the compiler, which makes the result position-independent.


== Inline Assembly ==
== Inline Assembly ==

Revision as of 12:44, 2 May 2011

This page is a stub.
You can help the wiki by accurately adding more contents to it.

Turbo C (aka TC) is Borland's 16-bit C compiler. In OS development, it is only useful for developing real mode operating systems. TC normally compiles to a DOS .exe executable, but the generated code can be turned into a flat binary by exe2bin if you compile with the -mt (model tiny) argument to the compiler, which makes the result position-independent.

Inline Assembly

Inline assembly works fine in Turbo C, but there are a few rules:

  • You must compile from the command line!
  • You must own TASM or pass -Exxx to the compiler!

-Exxx specifies an alternate assembler to use, eg. -Enasm.exe if you wanted to assemble with NASM.