VOGONS


First post, by johnyjj2

User metadata
Rank Newbie
Rank
Newbie

Hello!

I tried to compile code in Turbo Pascal with the use of DOSBox. I installed it, run, mounted "mount C C:\dosprog\". I copied files of my code (without any changes, it was oryginally created in Dos). They are copied to C:\dosprog\tp7\prog. I run in DOSBox command "c:\tp7\bin\turbo.exe", open file "c:\tp7\proj\trc.pas", compile it (Alt+F9), see the error "Error 15: File not found (CDF.TPU). I escape turbo.exe, type "cd ..\prog", type "dir cdf" and I see "CDF 0", "CDF PAS", "CDF PPU", "CDF TPU".

Greetings!!

Reply 1 of 15, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

did you set the paths as you did in DOS ?
I recall TP needs paths to be setup correctly

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

Reply 2 of 15, by johnyjj2

User metadata
Rank Newbie
Rank
Newbie

I opened Z:\AUTOEXEC.BAT with Dos Navigator on DOSBox. There is only one line

SET BLASTER=A220 I7 D1 H5 T6

I found this http://www.askmehelpdesk.com/windows/dos-set- … mand-52652.html and added the following lines

set PATH=c:/tp7;
set PATH=c:/tp7/bin;%PATH%
set PATH=c:/tp7/prog;%PATH%

The error occured "Can't write Z:\AUTOEXEC.BAT" so I don't know where to edit it. I don't see autoexec in C:\dosprog or C:\Program Files\DOSBox-0.73. Autoexec in C:\ doesn't contain anything so it is not DOSBox's autoexec but Windows' autoexec.

So where to edit it? And are these three lines sufficient?

Greetings!

Reply 3 of 15, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

Windows doesn't have an autoexec.

DOSBox doesn't use autoexec.bat. The autoexec.bat you see in Z:\ is just a copy of the lines that you input into the [autoexec] section of DOSBox.conf. You cannot edit the DOSBox autoexec.bat, only thing you can do is input the lines you want into the [autoexec] section of DOSBox.conf

If the program you are using runs fine but your compile errors out then perhaps something is wrong with the code? Mabye it references a path that is incorrect?

How To Ask Questions The Smart Way
Make your games work offline

Reply 4 of 15, by johnyjj2

User metadata
Rank Newbie
Rank
Newbie

Thanks for your answer.
Why cannot I see DOSBox.conf in C:\Program Files\DOSBox-0.73 ?
Greetings!

Reply 5 of 15, by Kippesoep

User metadata
Rank Oldbie
Rank
Oldbie

As of DOSBox 0.73 the configuration file is no longer created in the program directory by default. Instead, it is in the user directory (to allow for running without administrator privileges, which is the common case under Vista as opposed to XP). When you have used the standard DOSBox installer, there is a shortcut to edit the config file in the start menu.

My site: Ramblings on mostly tech stuff.

Reply 6 of 15, by johnyjj2

User metadata
Rank Newbie
Rank
Newbie

Thanks!

I changed it into the following:

[autoexec]
# Lines in this section will be run at startup.
MOUNT C C:\DOSPROG\
PATH=C:\TP7;C:\TP7\BIN;C:\TP7\PROG

And still there is the same problem. The code is all right because there was no such a problem in Free Pascal. The error is as follows: Error 15: File not found (CDF.TPU). And the code responsible for this error: uses printer, crt, dos, cdf;

Greetings!

Reply 7 of 15, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Check the turbo pascal unit search path, somewhere in the options.

Reply 8 of 15, by johnyjj2

User metadata
Rank Newbie
Rank
Newbie

Thanks for your reply!
In Turbo Pascal options I've got Compiler / Memory sizes / Linker / Debugger / Directories / Tools / Environment->. I enter Directories and see:
EXE & TPU directory: []
Include directories: []
Unit directories: [C:\TP\UNITS]
Object directories: []
I changed name of main directory of Turbo Pascal from tp7 to tp but it didn't help.
I added to Include directories new entry: "C:\TP;C:\TP\BIN;C:\TP\PROG" but still there is "Error 15: File not found (CDF.TPU)".
What else can I try to change in Turbo Pascal configuration?
Greetings!

Reply 9 of 15, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

This is the relevant directory:

Unit directories: [C:\TP\UNITS]

To check what path you have to add, use dir *.tpu (inside dosbox) in the
respective directories.

Reply 10 of 15, by johnyjj2

User metadata
Rank Newbie
Rank
Newbie

Thanks!
I added C:\TP\PROG to the line Unit directories. Now it compiled. I run the application and... "I can't find file TC.SCD! Without this file program cannot run!". It is info written (writeln) in the code so executed by the application. I guess now something should be changed in DOSBox, not TP7. But what 😀?
Greetings!

Reply 11 of 15, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

This message has neither to do with dosbox nor with tp7, check/fix your program (or copy the file where it's expected by your app).

Reply 12 of 15, by johnyjj2

User metadata
Rank Newbie
Rank
Newbie

This is code responsible for the information:

assign(comparison,'TC.SCD');
{$I-} reset (comparison); {$I+}
if IOResult=2 then
begin
writeln(#7,'I can't find file TC.SCD! Without this file program cannot run!');
halt
end;

So I guess I should change something in the line

assign(comparison,'TC.SCD');

But what? I guess specyfing full directory for the file wouldn't be good idea.

Greetings!

Reply 13 of 15, by johnyjj2

User metadata
Rank Newbie
Rank
Newbie

I erased the whole procedure because application can work without it. And yes, changing it to the full directory name works.

When I compile this program, I can use "Run" and the application starts. But even if I run "Compile", "Make", "Build" it doesn't create any exe file in the directory. Do you know what the reason may be?

Reply 14 of 15, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

it doesn't create any exe file in the directory

Set the output mode to DISK (not MEMORY).

Reply 15 of 15, by johnyjj2

User metadata
Rank Newbie
Rank
Newbie

Thanks 😀