Turbo Pascal is an old software development system including a compiler and an integrated development environment for the Pascal programming language running on CP/M, CP/M-86, and DOS.
Questions tagged [turbo-pascal]
115 questions
6
votes
3 answers
Dynamic array in Turbo Pascal
I am working on my school project and I would like to use Dynamic (not static) array. I worked with ObjectPascal, so I am used to some syntax. But now I am programming in the old TurboPascal (I am using Turbo Pascal 7 for Windows).
It doesn't seem…
user7625212
6
votes
2 answers
Read/Write to file on old IBM PS/2 in turbo pascal 5.5
The Question: I recently acquired a 1989 IBM PS2 and I am trying move large files from my newer UNIX-based machine to this IBM via floppy. I have a bash script that splits my files into ~2MB chunks, now I am trying to write a pascal program to…

Caleb Adams
- 4,445
- 1
- 26
- 26
6
votes
2 answers
Terminate hanging program and return to Turbo Pascal 3
I am running Turbo Pascal 3.01A on CP/M 2.2. Suppose my Pascal program, which I run using the R menu option in Turbo Pascal, has a bug and goes into an infinite loop. Is there a special control character that will interrupt my program and return…

Vebjorn Ljosa
- 17,438
- 13
- 70
- 88
5
votes
2 answers
Call graph for a turbo pascal program
I am doing some maintenance to a 18 year old pascal program. To help me understand how everything fits together I want to draw a call graph. However I cant find any software that can draw a call graph for pascal source. I am currently using Turbo…

Gerhard
- 6,850
- 8
- 51
- 81
5
votes
1 answer
How to un-AssignCrt(Output)?
In TurboPascal program i took an advantage of DOS processed output and use Tab control character to form columns in the output:
const Tab = #09;
...
Writeln(X, Tab, F(X));
However, when i tried to add a pause-like functionality via ReadKey call and…
user1242199
5
votes
1 answer
What does the name of the Turbo Pascal "crt" unit stand for?
"Cathode Ray Tube"? "C RunTime"? Neither makes much sense to me; something else entirely?

Brian Bi
- 111,498
- 10
- 176
- 312
4
votes
3 answers
Converting Turbo Pascal inline code to Object Pascal
While converting old Turbo Pascal units to modern Object Pascal, I ran into the following:
function Less (var a, b; Relation : POINTER) : boolean;
inline($5B/$59/$0E/$E8/$00/$00/$58/$05/$08/$00/$50/$51/$53/$CB);
The code is supposed to call an…

Engelbert Buxbaum
- 99
- 3
4
votes
0 answers
Converting Turbo Pascal SOUND command to FireMonkey
I am converting a 30+ year old Turbo Pascal program to FireMonkey. One of the things that appears to have no equivalent is the SOUND command. I found elsewhere on StackOverflow that it can be replaced with the Windows beep (in VCL), but I need a…

Mad Martian
- 109
- 6
4
votes
1 answer
Convert double to Pascal 6-byte (48 bits) real format
I need to do some work on data contained in legacy files. For this purpose, I need to read and write Turbo Pascal's 6-byte (48 bit) floating point numbers, from PHP. The Turbo Pascal data type is commonly known as real48 (specs).
I have the…

Monika
- 265
- 2
- 8
4
votes
0 answers
Spearmans rank with ties in pascal
I'm working on a project where I need to calculate the spearman's rank of some data, Currently my program can calculate the spearmans rank as long as their are no tied rankings. I would use an existing unit but I need to display the ranked values in…

Confused
- 41
- 1
4
votes
2 answers
How to convert the I/O port access of Turbo Pascal for Win32 to C#.Net
I have a Coin Counter Machine(SC350/360) which connects to a computer via RS232C Interface. I've the technical documentation which describes the communication protocols and a working pascal program is also included for manipulating the machine. I…

Eliyah
- 330
- 4
- 14
3
votes
2 answers
Accessing high Performance Counter in 16-bit Turbo Pascal
I'm trying to use the high performance counter in a 16-bit Turbo Pascal 7 program (don't ask...) running in a WinXP DOS box. I can execute the RDTSC instruction with inline $0F, $31 and the contents of AX and DX are set to what look like sensible…

rossmcm
- 5,493
- 10
- 55
- 118
3
votes
2 answers
Profiling computations in Turbo Pascal and Turbo C
I recently been doing some tasks for university, which include using Turbo Profiler (the software is implicitly declared in the task, sadly) for profiling C and Pascal implementations of Simpsons numerical integration. I came across very strange…

Semyon Danilov
- 1,753
- 1
- 17
- 37
3
votes
3 answers
MD5 in Delphi/Pascal/FreePascal for short strings
I am trying to implement simple MD5 for short strings (shorter than 64 bytes).
I am using algorithm from Wikipedia..
Everything compiles, but my result for string:
"hello world"
is:
BB3BB65ED0EE1EE0BB22CB93C3CD5A8F
while it should…

Tom
- 2,962
- 3
- 39
- 69
3
votes
2 answers
Reverse engineering a delay function written for an old computer
I'm trying to port some old Pascal code that I was handed, whose purpose is to control a digital I/O card, and I've run into a snag involving a wait function. Whenever sending a signal the programmer would do something like this
[Set the port…

user3464692
- 31
- 1