Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can Turbo Pascal run programs that take command line arguments?

161 views
Skip to first unread message

Paolo Amoroso

unread,
Oct 22, 2022, 9:19:16 AM10/22/22
to
Turbo Pascal's Run command runs the program loaded in memory. Can the development environment run also programs that take command line arguments, without compiling to a file and exiting to CCP? Is there any way of doing this under CP/M-80 or CP/M-86, not M/PM or Concurrent CP/M?

fridtjof.ma...@gmail.com

unread,
Oct 22, 2022, 3:13:24 PM10/22/22
to
On Saturday, October 22, 2022 at 9:19:16 AM UTC-4, paolo....@gmail.com wrote:
> Turbo Pascal's Run command runs the program loaded in memory. Can the development environment run also programs that take command line arguments, without compiling to a file and exiting to CCP? Is there any way of doing this under CP/M-80 or CP/M-86, not M/PM or Concurrent CP/M?
Yes.

ParamCount and ParamStr functions work in programs that are compiled to COM, and in programs run from memory. Use the P command in the IDE.

I think (haven't checked) that this was introduced in Turbo Pascal 3.

FredW

Paolo Amoroso

unread,
Oct 22, 2022, 3:20:06 PM10/22/22
to
On Saturday, October 22, 2022 at 9:13:24 PM UTC+2, fridtjof.ma...@gmail.com wrote:
> ParamCount and ParamStr functions work in programs that are compiled to COM, and in programs run from memory. Use the P command in the IDE.
>
> I think (haven't checked) that this was introduced in Turbo Pascal 3.

The command P may have been introduced in a later version as I can't find it in the Turbo Pascal 3 IDE.

Paolo Amoroso

unread,
Oct 22, 2022, 5:00:15 PM10/22/22
to
On Saturday, October 22, 2022 at 9:20:06 PM UTC+2, Paolo Amoroso wrote:
> The command P may have been introduced in a later version as I can't find it in the Turbo Pascal 3 IDE.

I stand corrected, Fridtjof is right. Turbo Pascal 3 does support the "command line Parameter" under "compiler Options" but only under CP/M-86. The CP/M-80 version of the IDE provides the equivalent "eXecute" main menu command for running arbitrary programs, for example the one under development.

fridtjof.ma...@gmail.com

unread,
Oct 22, 2022, 5:07:39 PM10/22/22
to
Paolo

Yes! This is not in CP/M-80, X does work, and passes args.

dxforth

unread,
Oct 23, 2022, 4:46:10 AM10/23/22
to
On 23/10/2022 8:00 am, Paolo Amoroso wrote:
>
> The CP/M-80 version of the IDE provides the equivalent "eXecute" main menu command for running arbitrary programs, for example the one under development.

I wonder what that involved. Presumably the memory holding the RTL and below would
be trashed by the executing program.

A2CPM

unread,
Oct 23, 2022, 7:49:06 PM10/23/22
to
Reverse engineered source exists for both the CP/M and x86 versions of Turbo Pascal. Adding support for the 'P' option to the CP/M version might be an interestion project.
0 new messages