VOGONS


Turbo Pascal problem

Topic actions

First post, by Kirirus

User metadata
Rank Newbie
Rank
Newbie

A simple program

Uses Graph; Var GD,GM:integer; Begin GD:=VGA; GM:=2; InitGraph(GD,GM,''); CloseGraph; End. […]
Show full quote

Uses Graph;
Var GD,GM:integer;
Begin
GD:=VGA; GM:=2; InitGraph(GD,GM,'');
CloseGraph;
End.

does not work...

Reply 1 of 6, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Works fine, assure that the bgi drivers are present and stuff.

Reply 2 of 6, by bloodbat

User metadata
Rank Oldbie
Rank
Oldbie

As WD said, you're probably missing the .BGI file in the same folder as your executable, just out of curiosty add

cleardevice;

after initgraph and before closegraph
and

writeln(graphresult);

after closegraph and before end. so you can see what (if anything) went wrong as a numerical result since, at the moment, it's doing nothing and it might indeed be working and you're just simply not noticing (on exit TP restores the CRT mode and it exits right after closegraph; if you want it to wait, add

readln;

after cleardevice, so you can see your wonderful black graphics screen).

Reply 3 of 6, by Kirirus

User metadata
Rank Newbie
Rank
Newbie

The BGI file is present... When I trace the program with F8, it works normally, when i try to start it with Ctrl-F9, DosBox window immediately closes.

System is Win7, when I used XP, all programs worked normally.

Reply 4 of 6, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

ctrl-f9 is the key shutdown dosbox

Water flows down the stream
How to ask questions the smart way!

Reply 5 of 6, by Kirirus

User metadata
Rank Newbie
Rank
Newbie

This is zip with program and TP.

Reply 6 of 6, by Kirirus

User metadata
Rank Newbie
Rank
Newbie

ctrl-f9 is the key shutdown dosbox

😀 😀 😀 Hah!
Thanks!