Questions tagged [turbo-c]

Turbo C was an Integrated Development Environment and compiler for the C programming language from Borland, released in 1987. It had been re-release as freeware version 2.01 by 2006.

First introduced in 1987, it was noted for its integrated development environment, small size, fast compile speed, comprehensive manuals and low price.

Today, Turbo C is considered obsolete. It is a 16-bit compiler for DOS environments, and as such cannot access more than 640 KB of memory (and even that only with difficulty), and cannot interoperate with 32- and 64-bit code in modern operating systems. Additionally, due to its age, its standard library differs in some significant fashions from modern C libraries. Plainly put, it is not an appropriate tool for many development tasks today.

Despite this, it is sometimes used in introductory C programming courses, particularly in India. Students using Turbo C should keep its limitations in mind.

273 questions
5
votes
2 answers

C Two-Dimensional Array

I'm going to ask something about my code provided below... My question is in the line where there's a comment /*This line*/. I used variable y and x: y for the HEIGHT and x for the WIDTH. The very first time I run the program, the code was…
Aaron
  • 1,969
  • 6
  • 27
  • 47
5
votes
3 answers

Compile and Link to .com file with Turbo C

I'm trying to compile and link a simple program to a DOS .com file using Turbo C compiler and linker. By that I try the simplest C-program I can think of. void main() {} Are there command line arguments to link to com files in the Turbo C Linker?…
user9343438
5
votes
2 answers

How to write inline Assembly with Turbo C 2.01?

I want to write some inline assembly in a DOS program which is compiled using Turbo C 2.01. When I write asm { nop } the compiler claims that in-line assembly is not allowed in function .... See: Any ideas?
mythbu
  • 786
  • 1
  • 7
  • 20
5
votes
2 answers

how to create a project in turbo c++ 16 bit compiler

I want to create a project file turbo c++ and link the files in this project. Although i have tried for it but i found only one option that to open a project no option to create a new project. So How to do that.
Saurabh Mehta
  • 51
  • 1
  • 2
5
votes
10 answers

How do I perform "Millions of Calculations?"

My code is pasted below.When I run this program,it keeps on calculating.I am using the old Turbo C++ compiler.How much time should such a program take to execute?I waited about 5 minutes but there wasn't any output. /*The sum of the primes below 10…
user379888
5
votes
1 answer

How do I properly allocate a memory buffer to apply double buffering in dosbox using turbo c?

Okay so I am trying to apply a double buffering technique in an emulated environment (DosBox) while using the IDE Turbo C++ 3.0 I am running windows 7 64bit(Not sure if that matters) and I have no clue how to properly execute the buffering routine…
Drozerix
  • 53
  • 6
4
votes
4 answers

Easiest way to colour text in C/C++ DOS?

I made a basic snake game in a DOS enviroment using turbo C++ 3.0, and I'm quite a rookie myself. I've been looking for a while for a very simple and perhaps rudimentary way of making text of different colors in a DOS window. I'm not looking for…
Bugster
  • 1,552
  • 8
  • 34
  • 56
4
votes
2 answers

Inline assembly in C with Turbo C 3.0 - how to get address of a label

I'm trying to get address of a label - here is some sample code: int main() { asm { mov ax,1 mov bx,ax } _labelname: asm { mov ax, OFFSET _labelname } return 0; } Compilation of this code returns this…
Mikael
  • 127
  • 2
  • 10
4
votes
5 answers

How can I terminate an infinite loop in Turbo C?

I get stuck in an infinite loop. How can I terminate this loop? I tried to use/press Cntrlc but nothing happens. I don't know how to stop it. main() { while (1) { char ch; printf("Enter a character: \n"); ch…
Aaron
  • 1,969
  • 6
  • 27
  • 47
4
votes
1 answer

How to prevent duplicate chars when I press keys on the keyboard

I am trying to learn how to prevent the keyboard sending multiple chars to the screen and to scanf under DOS. I am using Turbo-C with inline assembly. If the characters entered on the keyboard are: mmmmmmmmyyyyy nnnnnaaaaammmmmmeeeeee iiiiiissss…
Haim
  • 77
  • 6
4
votes
1 answer

Graphical functions in C

Why I see nothing when I run my code ? I use DOSBox. #include #include #include #include #include #include #include #include int main() { int gdriver = DETECT,gmode…
Denys Shabelnyk
  • 125
  • 2
  • 11
4
votes
3 answers

Why in Turbo C compiler sizeof(int) is 2 bytes and in gcc Linux compiler is 4 byte?

Why in Turbo C compiler sizeof(int) is 2 bytes and in gcc Linux compiler is of 4 bytes?
Mukul
  • 114
  • 1
  • 11
4
votes
3 answers

Alternative to Turbo C

My university is hosting a Programming Competition, and have decided to support Turbo C (the 16-bit DOS version) as a valid programming environment. I have just read that PC^2, the software that is going to be used to auto-judge the competition,…
Jibran
  • 920
  • 9
  • 25
4
votes
6 answers

Cannot run c graphics programs

I have developed a graphic program on a desktop system. But when I tried to run it on the hp compaq laptop it's not getting executed. I developed it using Turbo C. Then i tried writing a simple graphic program in Turbo C on the laptop, but the…
PrithviRaj
  • 571
  • 1
  • 7
  • 15
4
votes
3 answers

What C compiler matches Borland Turbo Link 5.1?

We have an environment built upon Borland Turbo Assembler 5.3 and Turbo Link 5.1. We have to maintain some hereditary code in it, so throwing them away is out of the question. Now I want to introduce some C into it. Neither GCC, nor Microsoft C/C++…
akalenuk
  • 3,815
  • 4
  • 34
  • 56
1
2
3
18 19