[geeks] Learning 360-assembly on Hercules

vintagecoder at aol.com vintagecoder at aol.com
Wed Oct 5 08:32:27 CDT 2011


Hi Joost,

> Having cut my teeth on programming in Assembly for the Z80 and 6502 in
> the Eighties, and not having done much Assembly programming at all since,
> I find myself interested in learning Assembly for the IBM 360 family. I
> work in the old iron business, programming in COBOL, PL/I and C on IBM
> mainframes and HP (Tandem) NonStop systems. The few times I encountered
> Assembly on the mainframe, professionally, it was always surrounded by
> myth: objects freely roaming the system that were programmed in ancient
> times by bearded gurus long since retired, program modules used by
> everyone but maintained by none and understood by even fewer.

The yahoo groups for Hercules-390 and Hercules-MVS are excellent resources
for Hercules and MVS questions. The mood swings over there have gotten
worse in the past few years but there are still a few real helpful guys who
know what they're talking about. I would avoid getting a recent build of
Hercules.

Your HLL coding will definitely benefit from learning assembler. The
optimizations in PL/I have long been excellent, COBOL does a good job too.
I haven't looked at much C. You can generate assembler listings for those
languages and see and finally understand exactly what your source code gets
compiled (assembled) to. And you can prove for yourself the right and wrong
ways to do things and understand the tradeoffs. Knowing assembler on IBM
is never wasted as long as you have any connection to a mainframe since the
OS itself and all systems services are written in assembler and have
assembler (only) interfaces.

> Well then, there must be a way to capitalise on this and carve out a
> niche, methinks. So, several questions spring to mind: is it a feasible
> desire to run Hercules on Mac OS (currently working at a Tandem shop, so
> no mainframe access), install one of the free OS options and use that to
> learn S/390 Assembly in a manner sufficently relevant to current
> production systems, i.e. will the knowledge I gain be applicable to
> today's mainframe operating environment?

None of the free OS available run in 390 mode which btw is as you probably
know itself one major generation old. The best available choice for learning
assembler is going to be the public domain MVS 3.8J which is a circa 1974
system, 24 bit addressing. I really can't recommend it to people who don't
have mainframe experience since there is no ISPF and it's so many
generations back. There is TSO, but it's no fun. I would actually rather
punch cards (and I did) than use TSO without ISPF. Since you have mainframe
experience you are in a good position to learn this stuff. You can edit
your code and jobs and review the output from Mac OS but you will need to
understand the IBM system utilities enough to do library management and
misc. tasks to administer your system. There are two basic choices in the
free MVS 3.8J system, one is use the "turnkey" which is a distribution set
up by sysprogs who added some extra tools. Don't download the tarball
without getting advice from the turnkey mvs yahoo group. A much newer
version is available somewhere. The other way is to do your own sysgen which
for most people would be totally out of the question except for Jay
Moseley's incredible step-by-step instructions and helper scripts.
http://www.jaymoseley.com

Once you set up MVS 3.8J you will be able to use the assembler and learn
the S/370 instruction set. IBM has been very careful with upward
compatibility, almost everything that ever worked still will. The problem
is things have changed dramatically and the right (best) way to do almost
everything has changed dramatically. Specifically to your question, you
will be able to learn many basic concepts (but you will also miss many
basic concepts) and get a taste of assembler programming and even write code
that will run on modern systems. But you won't be able to exploit many
important features, and you won't be able to run code (on your system) that
is written the way it should be for z/OS, so you should consider it a fun
and interesting way to get started, but not an end in itself.

An alternative is http://www.z390.org. A guy named Don Higgins is writing
and maintaining sort of a z/OS system implemented in Java GPL. It's a pretty
weird setup with a lot of non standard stuff you have to use in your
actual source code, so I don't normally recommend it, but since you have a
mainframe background and will be able to spot some of the stuff that doesn't
belong "in real life" and hopefully not get tripped up too badly it might be
an ok choice for you, especially since it supports the latest opcodes and is
actively maintained. The problem is there are almost no system services
available of course, because all of the services are licensed materials of
IBM. Besides GETMAIN and OPEN/CLOSE clones there isn't a whole lot of
support there and there is a limit to how much ever can be. Higgins is not
new to this, he had a System/370 emulator and cross assembler hosted on
MSDOS back in the day. Constantly being improved and if anybody can do it,
he can. Both this and Hercules have active communities. z390 is definitely
worth looking at but may not be for you.

> Any list members able to offer insight into the market for Assembly
> programming in the EU, specifically the Benelux/Germany/UK?
> (International insights welcome, if less relevant to my professional
> scope. But, hey, it's a list so let's share the knowledge!) As stated
> above, there appear to be very few people around who master this ancient
> art. 

There has been virtually no commercial assembler (by that I mean
applications) written in America since the 1980s. Other than the very rare
glue module or specialized subroutine there's no excuse for writing
application code in assembler and hasn't been for decades. Systems software
companies still use it heavily but there has been a lot of consolidation and
most of the companies that were around don't exist anymore and the ones that
do are trying (and failing but not realizing it fast enough) to go offshore
to India, China etc. If you're looking for a new job and don't already have
a few decades of doing this (and even if you do) assembler isn't going to be
something anybody is interested in. If they are, they need to email me
since I have been laid off for the first time over 30 years in the business
and haven't found anything yet. Knowing what you already know *and* adding
assembler to your resume is certainly something valuable because of the
insight you'll have into what COBOL. PL/I etc are doing. Whether a recruiter
or HR person will realize that is doubtful though.


> Lastly, any pointers as to where I might start my journey? Books, papers,
> FAQ's, blogs, code snippets, language definitions, podcasts, etc.? 

I don't think there were ever that many resources on IBM assembler, the way
we all learned was from the Principles of Operation (POPS) and reading
code, especially IBM code. I never used a textbook aside from the IBM
intro. You'll find everything you need in the IBM doc (it's excellent
although now huge). The advantage from starting back in 1974 is getting
stuff in small bites when you could lift a manual without a floor jack. If
you had to start now and learn it I don't know that anybody could. There's
just too much going on in z/OS. In that way it does make sense to start
from the old days and work up.

Bitsavers.org is going to be the first place to start looking for doc if
you want to run MVS 3.8J and use the assembler, linkage editor, and run
jobs. Many of the current manuals contain info that's still relevant to
that system but it's a lot easier to go over the older manuals since
they're so much smaller. In particular, you should find the introduction to
assembler programming (I can't remember where Al has it, either in 360 or
370) and the System 370 Principles of Operation and the Assembler
Programmer's Guide and Assembler Reference for your release of the
assembler. Then you will need the Assembler Services Guide and Assember
Services Reference(s). Those cover the systems services (assembler macros)
the OS provides to get stuff done. Most of the JCL you know will be
instantly familiar and work with very minor changes and the MVS 3.8J system
will come with a proclib populated with procs to run assemblies and COBOL
and FORTRAN compiles.

-- 
+------------------------------------------------------------------------+
| Vintage Coder America Online          ivagntrpbqre at nby.pbz <ROT13>     |
|                                                                        |
| Collecting: DOS assemblers, compilers, & books (Z80, M68K, 6502, 808X) |
| 	      Software & doc for IBM S/360 through OS/390                |
|                                                                        |
| Wants:      Ada 95 compilers for MVS/ESA & Solaris SPARC               |
|             PL/I X Optimizing Compiler for MVS, APL/SV for MVS         |
|             Stony Brook Modula-2 for Solaris SPARC                     |
|---------------------------------------+--------------------------------|
|        Powered by Slackware 64 Intel and Solaris 10 SPARC              |
|=======================================+================================|
| PGP Key 4096R     0x1CB84BEFC73ACB32     Encrypted email preferred     |
| PGP Fingerprint   5C1C 3AEB A7B2 E6F7 34A0  2870 1CB8 4BEF C73A CB32   |
+------------------------------------------------------------------------+


More information about the geeks mailing list