[fpc-other] Stanford Pascal Compiler successfully ported to Windows, OS/2 and Linux

Mark Morgan Lloyd markMLl.fpc-other at telemetry.co.uk
Sat Dec 24 12:50:03 CET 2016


On 24/12/16 11:30, Bernd Oppolzer wrote:
> Hello Mark,
>
> on several occasions, I looked what FPC does, when I extended the
> Stanford compiler, for example when I added support for direct write
> of scalars.
>
> At one time I recall that I decided explicitly to take another direction;
> that was when I allowed shorter string constants to be assigned to
> longer ones, for example:
>
> var x: array [1 .. 200] of char;
>
> x := 'some string';
>
> IIRC, FPC fills with hex zeroes, but I prefer blanks - the blank
> representation
> of the target system ... which is different on the target systems; this
> should
> show to some of the readers here which are not familiar with IBM mainframes
> some of the difficulties I had to get the P-Code really portable ... all

I think the issue of padding partially-initialised data structures is 
something that merits wider discussion. Provided of course that we can 
avoid the sort of arcana that Paul/Kerravon is enmired in :-)

> chars in
> the (character) P-Code file had to be converted to character constants; all
> places where character A - for example - was represented as numeric 193
> (which is EBCDIC 'A') had to be found and corrected. Even such places where
> the reference to 193 was not recognized at first sight, that is: offsets in
> branch tables and bit strings representing sets.

I think you've made creditable progress in a difficult area. What are 
you doing about PRED() and SUCC() as applied to CHARs?

Anybody with any sort of interest in mainframes is going to have to 
consider EBCDIC for quite some while, but unfortunately there are still 
people who insist that it's flawless. One of our wiki pages has somebody 
confirm that EBCDIC has ^, but he then goes on to admit that it's not in 
all codepages...

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]


More information about the fpc-other mailing list