[fpc-devel] On a port of Free Pascal to the IBM 370

Paul Robinson paul at paul-robinson.us
Tue Jan 17 21:52:38 CET 2012

From: Paul Robinson <paul at paul-robinson.us>

As has probably been a bit of a scare to some people, I've more-or-less "unofficially announced" by putting up an article on the Free Pascal Wiki regarding how I've decided I am going to work on porting the Free Pascal compiler to the IBM 370 series mainframe, otherwise known as the zSeries.  And that, having spoken to a few people here, I've been made aware this has sort of been scary or incredible to some of the other people working on this project because they realize that there is a hell of a lot of work involved and I may not be aware of what I'm up against.  I can understand, and I can sympathize with their thoughts.  

I want to do this because I want to get involved in something I can do, because I am familiar with IBM mainframe assembler, I'm not really that familiar with Intel/AMD assembly and because (for reasons I might go into later) I think it needs to be done, I can do this and I've decided I want to.  There are also a couple of other things I want to get involved in doing which will be a significant improvement to Free Pascal even if this does not get done; I'll post that in a separate message.

So in response to those who are incredulous at my audacity or think I'm not aware of what's involved, I'll include a statement I've added to the Wiki about my efforts to do the port / cross-compiler for the IBM 370 (zSeries), which is at http://wiki.freepascal.org/ZSeries/Part_1

- Start Story -

I am aware, first, that this will be a huge undertaking; this is not a weekend project.  I'm probably looking at a minimum six months work, possibly longer.  I have a story.  When I wasn't doing programming I did mobile notary.  I was, then, a commissioned Notary Public for the Commonwealth of Virginia (I'm now commissioned in Virginia and Maryland), and one of the things that was developed was, when people refinanced their mortgages, the company would send a notary right to the person's home or office.  Well, one of the customers happened to discuss how they wanted to upgrade the application that their people ran to handle booking of services.  It was a DOS application, they wanted to do more things with it and they wanted it to be a GUI under windows.  At that time Free Pascal did not have the equivalent of Lazarus, so I unfortunately had to use Visual Basic to do so.  (Please do not send me hate mail, I have to use what I have available.)

Well, anyway, so I had several meetings with the customer and arranged terms including price.  I worked on it on a regular basis, implemented it through "accretion" in which you get part of it working and they can see how it's coming along.  We had to change things along the way and various fits and starts, but in the end, they were very pleased with the program that they can use for their employees who book orders on their laptop computers.  It wasn't a very big program in terms of what was going on, they have it running on about 60 computers, but from when we first sat down to decide what they wanted, until it was fully running and distributed out to everyone took one solid year.  

So the point of this shaggy dog story is that I'm aware that this is a long-term project and will probably take months.  I am also aware that the compiler won't work when I first make changes because I have to learn where the main part of the compiler hands off control to the machine-specific and OS-specific routines so that it can ask that routine, "Hey, the user is implementing a FOR statement, you need to create the code to do this." or "Hey, the guy is declaring the start of a procedure that has an integer argument, here's the information on how it's supposed to be defined."

So anyway, I know there's a lot involved, there will be fits, and starts, and things won't always go right.  But it's a learning experience, and, if you follow this as it goes along over the months as it progresses, maybe you'll learn something too.

- End of Story -

The Lessons of history teach us - if they teach us anything - that no one learns the lessons that history teaches us.
The following is to allow readers of the listing digest to know where this article ends.
-- End of Message by Paul Robinson --

More information about the fpc-devel mailing list