[Simh] anyone know how to convert/translate turbo pascal to vax pascal?

Dan Gahlinger dgahling at hotmail.com
Thu Feb 8 01:52:40 EST 2018


I didn't port it from vax pascal.
in fact, I've never done any vax pascal programming in my life.

I ported it from vax fortran to turbo pascal. yeah, that was fun, not.

but now I want to move my new code back to the vax in whatever language.

vax basic is the one I'm most familiar with, followed by DCL

the free pascal code is on the order of several hundred thousand lines of source code.
it's become quite a beast over the decades.
maybe I'll spend the next 38 years porting it back 😊
Dan.
________________________________
From: Jeremy Begg <jeremy at vsm.com.au>
Sent: February 8, 2018 1:36 AM
To: Dan Gahlinger
Cc: Jeremy Begg; Jon Elson; simh at trailing-edge.com
Subject: Re: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

Despite porting the program from VAX Pascal to various flavours of other Pascal, it seems you don’t recall much about the language.
Moving from Pascal to BASIC would be quite an exercise.

In VAX Pascal the reserved identifiers INPUT and OUTPUT refer to SYS$INPUT and SYS$OUTPUT, respectively.
Here’s a simple program which prompts for user input.

program hello(input,output);
var s : varying [80] of char;
begin
write('What is your name? ');
while not eof(input) do
    begin
    readln(s);
    if length(s) > 0 then break;
    write('What is your name? ');
    end;
writeln('Hello ', s);
end.

Jeremy

On 8 Feb 2018, at 4:49 PM, Dan Gahlinger <dgahling at hotmail.com<mailto:dgahling at hotmail.com>> wrote:

I found a hello world pascal example online for vms,
so at least that much I can get working.

however, all the docs online are not so useful for programming itself.
my code has input and output from the terminal and from files.
the hello program uses: program hello(output);
so not sure how to do in and out from the terminal.
tried googling examples but no such luck beyond hello world.

it might be easier for me to port to vax basic, I used to be an expert at that, many moons ago.

Dan.
________________________________
From: Simh <simh-bounces at trailing-edge.com<mailto:simh-bounces at trailing-edge.com>> on behalf of Jon Elson <elson at pico-systems.com<mailto:elson at pico-systems.com>>
Sent: February 7, 2018 9:25 PM
To: simh at trailing-edge.com<mailto:simh at trailing-edge.com>
Subject: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

On 02/07/2018 05:57 PM, simh-request at trailing-edge.com<mailto:simh-request at trailing-edge.com> wrote:
> [Simh] anyone know how to convert/translate turbo pascal to
>        vax     pascal?
> Message-ID:
>        <DM3PR16MB0813E13BB9F23F23569DB71AC9FC0 at DM3PR16MB0813.namprd16.prod.outlook.com<mailto:DM3PR16MB0813E13BB9F23F23569DB71AC9FC0 at dm3pr16mb0813.namprd16.prod.outlook.com>>
>
> Content-Type: text/plain; charset="iso-8859-1"
>
> since I did all that work recreating "castle" from the vax to the pc
> using turbo pascal (then free pascal)
> I'd like to "port" it back to the vax,
> but the vms 7.3 pascal compiler doesn't recognize "writeln"
> and I suspect things like types and records and case statements wont work either.
>
> anyone have any ideas?
Umm, I just looked back at some Pascal code I had on VAX
Pascal, and it DEFINITELY has writeln statements in it.
This is such basic Pascal syntax, I can't imagine that did
not work.  But, maybe you have to enable some library or
Pascal "unit" to use those functions.

Jon
_______________________________________________
Simh mailing list
Simh at trailing-edge.com<mailto:Simh at trailing-edge.com>
http://mailman.trailing-edge.com/mailman/listinfo/simh
_______________________________________________
Simh mailing list
Simh at trailing-edge.com<mailto:Simh at trailing-edge.com>
http://mailman.trailing-edge.com/mailman/listinfo/simh

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.trailing-edge.com/pipermail/simh/attachments/20180208/9b754d72/attachment.html>


More information about the Simh mailing list