Turbo C

From OSDev Wiki
Jump to: navigation, search

This article is a stub! This page or section is a stub. You can help the wiki by accurately contributing 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.

Personal tools
Namespaces
Variants
Actions
Navigation
About
Toolbox