Questions tagged [turbo-pascal]

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.

115 questions
2
votes
1 answer

Calculating next date in Turbo Pascal

program date; uses wincrt; var m,ch,ch1,ch2,ch3: string ; mois,j,a,b: integer ; begin write('a');read(a); write('j');read(j); write('mois');read(mois); case mois of 1,3,5,7,8,10: if j<31 then begin …
2
votes
2 answers

Turbo-pascal home work

I need some help in this Turbo Pascal problem: Two integers are said to be brothers if each digit of N1 appears at least once in N2 and vice versa. Examples: if N1 = 1164 and N2 = 614 the program will display N1 and N2 are brothers, if N1 = 504 and…
2
votes
0 answers

Force monochrome mode in Turbo Pascal Turbo Vision / Free Pascal Free Vision

I'm writing a basic "hello world" program with Free Pascal Free Vision and I would like to remove the colors and to keep the program monochrome. Just black and white. I know this was possible in the old Turbo Pascal days but I can't find any…
EZM
  • 333
  • 1
  • 5
2
votes
2 answers

How to get assembly code in turbo pascal (dosbox)?

I just want to inspect the assembly code of my program to see if he is loading my data in some registers. I tried with "make" and "build" and selection "disk" as output, but there aren't any new files, besides source and exe file.
fpilee
  • 1,918
  • 2
  • 22
  • 38
2
votes
1 answer

how to fix exitcode 201?

I have a task to write a program in Pascal. When I run the program, the result was exitcode 201. I don't know how to fix this error. program convertTime; uses crt; Type Jam = record hh:integer ; …
Nabskyy
  • 29
  • 1
  • 1
  • 4
2
votes
3 answers

Check if bracket order is valid

what I am trying to do, is determine, whether brackets are in correct order. For example ([][[]]<<>>) is vallid, but ][]<<(>>) is not. I got a working version, but it has terrible efficiency and when it gets 1000+ brackets, its just crazy slow. I…
user2394418
2
votes
1 answer

I need to disable/switch print screen key in DOS with TurboPascal

Can anyone help me with that? Sorry for not being specific, but that is what I must do. I have no idea about how can i do that, is there a way to reassign keys directly from TurboPascal?
Mbl
  • 21
  • 1
2
votes
2 answers

BNF / EBNF for Turbo Pascal (preferably 5.5 or later, because of OOP)?

Does anyone of you know if the BNF or EBNF of Turbo Pascal is available somewhere (LEGALLY!!)?
Turing Complete
  • 929
  • 2
  • 12
  • 19
2
votes
1 answer

using assembly in Turbo pascal: line too long

I have this line of code: asm ... jmp @jmp_data @s1: dw $1120,$1120,$1120,$4420,$0020,$0020,$0020,$1120,$1120,$1120,$4420,$0020,$0020,$0020,$1120,$1120,$1120,$4420,$0020,$0020,$0020,$1120,$1120,$1120,$4420,$0020,$0020,$0020; …
exsnake
  • 1,767
  • 2
  • 23
  • 44
2
votes
1 answer

How to define a string using assembly 8086 in Turbo Pascal?

I only can write assembly code. I want to use the interruption 10h/13h to write a string to the screen. But I can't figure out how to define or save in memory a string using assembly in turbo pascal. This didn't work: msg1 'hello, world!$' My…
exsnake
  • 1,767
  • 2
  • 23
  • 44
2
votes
1 answer

Merge Sort Example for Pascal

My teacher gave me a homework about how to Merge Sort two arrays in Pascal. One of the arrays is named as N and sorted as ASCENDING.. Other array named as M and sorted as DESCENDING. They are pre-defined and he wants me to Merge Sort these two…
Berker Yüceer
  • 7,026
  • 18
  • 68
  • 102
2
votes
1 answer

Turbo Pascal 5.5 "Error 3: Unknown Identifier" with ASM keyword

I downloaded TP 5.5 and installed it in my Virtual Machine which is running FreeDOS. I tried this short code: Program test; begin asm mov ax, ax end; end. Turbo Pascal says: "Error 3: Unknown Identifier." I can use the keyword inline works BUT…
user250327
  • 33
  • 1
  • 5
2
votes
2 answers

Yahtzee 3 of a Kind

Here is my situation, i am currently creating a Yahtzee game using Turbo Pascal Language in Lazarus IDE and i am up to the scoring side of the developement, i have already completed the Lower section of scoring and i have started the Higher section…
Shayden117
  • 252
  • 1
  • 3
  • 17
2
votes
1 answer

Background changes by itself and procedure repeats many times until I release the mouse button

I am a student, and I'm working on a little slots game (if the same random number comes up 3 timed, you win). I use Borland Pascal 7. I use graph to make this a bit more visual, but when I start the game my background turns from black to grey, and…
Robert
  • 197
  • 11
2
votes
1 answer

Readkey in Pascal (Unknown Identifier)

I am learning how to use the graphic mode from Pascal (Using Turbo Pascal 5.5). This is a simple code, which shows me the graphic mode with some messages: program GraficoPri uses Graph; var Driver, Modo : Integer; begin Driver := VGA; Modo :=…
WolfangAukang
  • 21
  • 1
  • 4