5

The IBM/360 Macro Assembly language was quite powerful, allowing non-trivial compile-time string manipulation.

Did macro packages exist which would facilitate programming at a (slightly) higher level, like writing expressions in an infix form, allowing a form of structured programming, standardizing subroutine calling conventions, accessing bit-fields conveniently, etc?


The reason I'm asking it that one of the BESM-6 assembly languages was a syntax-level port of the IBM/360 assembler, including the macro language, e.g.

 macro
 mnop &a,&b,&c,&d,&e,&f,&g,&h
 aif (&a eq '').x
 gbla &cnt  global arith. variable
 mnote * comment &cnt
&cnt seta &cnt+1 
 nop &a
 mnop &b,&c,&d,&e,&f,&g,&h
.x anop
 mend
 MNOP  FIRST,SECOND,THIRD,FOURTH

expands to

 0001  0001        MACRO
 0002  0002        MNOP  &A,&B,&C,&D,&E,&F,&G,&H
 0003  0003        AIF   (&A EQ ’’).X
 0004  0004        GBLA  &CNT GLOBAL ARITH. VARIABLE
 0005  0005        MNOTE * COMMENT &CNT
 0006  0006 &CNT   SETA  &CNT+1
 0007  0007        NOP   &A
 0008  0008        MNOP  &B,&C,&D,&E,&F,&G,&H
 0009  0009 .X     ANOP
 0010  0010        MEND
 0011  0011        MNOP  FIRST,SECOND,THIRD,FOURTH
 0012  0005 * COMMENT 0
 0013 +0007+       NOP   FIRST
 0014  0005 * COMMENT 1
 0015 +0007+       NOP   SECOND
 0016  0005 * COMMENT 2
 0017 +0007+       NOP   THIRD
 0018  0005 * COMMENT 3
 0019 +0007+       NOP   FOURTH

But the precompiled macro package for "higher-level" programming (likely also ported from IBM/360 with the appropriate architecture-dependent modifications) is missing.

Here's a few examples of using the macros from the package:

RЕG (М1 = 1,М2 = 2,М3 = 3,М4 = 4,М5 = 5)
КТ1 ВINDА (А(PAGE1)+KMD+М14)
FКТ3 SТRIТ (NCMD,0,0,8),(NARCH,0,40,8),(SND,0,16,8)
ЕХРR (FNM = $) FILE NAME
ЕХРR (SND = (OWNER,ADDR)) SENDER
ЕХРR (NUMREQ = (OWNER,REQ)) REQUEST NUMBER
IFА (QUEUE),Z=DISCRD NO REQUEST

Searching the web for the most distinctive macro names BINDA and STRIT doesn't help.

If a macro package with those or similar macros existed for the IBM/360 Macro Assembler, getting access to its source code would be of great help.

2

There is a group of macros called Concept 14, that was written by an IBM Federal Systems employee named Marvin Kessler. They ran on IFOX00 (the F assembler) and were used as the basis for the HLASMTK SPM.

A former co-worker of mine, Paul Scott, provides them in IEBUPDTE format. He also has a scan of the documentation; unfortunately it is missing a page.

I believe they have also made it into the Hercules and z390 worlds.

2
  • 1
    The Concept 14 macro style looks closer to the excerpts I've quoted; according to the online mentions, it appears that Concept 14 was quite widely known, and it is plausible that its source or documentation had been brought to the USSR and have served as a prototype or a stepping stone for developing the BESM-6 variant. – Leo B. Nov 22 '20 at 6:12
  • 1
    They were used for prototyping structured macros for several assemblers. I saw them on Honeywell GCOS and I heard they were ported as well to the Digital Research CP/M MASM assembler. – zarchasmpgmr Jan 1 at 23:09
5

The IBM/360 Macro Assembly language was quite powerful, allowing non-trivial compile-time string manipulation.

Well, reducing it to "string manipulation" might fall short, as there is no similarity to the usual string manipulation languages. It's a rather full figured imperative programming language. Programs get executed when 'assembled'. It provides typed global and local variables (bool, integer, string), arrays (depending on assembler version) and more.

Did macro packages exist which would facilitate programming at a (slightly) higher level,

Not just 'slightly' higher.

like writing expressions in an infix form, allowing a form of structured programming, standardizing subroutine calling conventions, accessing bit-fields conveniently, etc?

For structured programming (which ofc includes calling conventions and data structures) this has already be kind of answered in a question about stacks on stackless machines:

How was C ported to architectures that had no hardware stack?


Example of a dummy program, calling a function and checking the result, copied from the answer:

    @ENTR TYPE=M,NAME=MAIN  ** Main programm, execution starts here
    ...
    @PASS NAME=FUBAR,PLIST=(FCB,RECORD)
    @IF   NE
    LTR   R15,R15         * Return Code Not Zero?
    @THEN
    @EXIT RC=#UNSATISFIED * Finish Program with Return Code UNSATISFIED
    @BEND
    ...
    @EXIT RC=#HAPPYENDING * Finish Program with Return Code HAPPYENDING
    @END


    @ENTR TYPE=L,NAME=FUBAR,PLIST=(FCB,RECORD)  * Function FUBAR, called by MAIN
    ...
    (do whatever needed with FCB and RECORD)
    ...
    @EXIT RC=0            * Finish Function with Return Code Zero
    @END

While the mentioned COLUMBUS Assembler (*1) package was AFAIK a Siemens specific development, it was 100% F-Assembler macro code. In addition to the macro library there were as well listing formatters that turned a straight assembler listing into an intended or Nassi/Shneiderman listings.

Besides that, projects/companies of course did build macro packages to enable easy handling of more complex issues. Plus, of course, every OS did supply macros for whatever services they had as well.


getting access to its source code would be of great help

Well, I do still have somewhere a tape with several versions (we did modify it quite a lot from its original version). In addition I did port it a long time ago to ORCA/M for the Apple II. Just, finding either may take some time.

Then again, building such a lib for structured programming is, with F-Assembler (or better) macros or higher/compatible, a mostly trivial task of building a parsing stack to check syntax and generate labels. Drop me a note, if you like some hints.


D/E/F-Assembler (and its macro language) was published short after the /360 was introduced with F being the 'full' version, but also coming with a huge RAM requirement of 64 KiB :)) So this is most likely the base for your package.


*1 - The same package was available for COBOL, just then code generation was done by a preprocessor.

13
  • Thanks, but if there were indeed multiple variants and versions of macro languages and packages, an arbitrary one won't help. I'm interested in packages written in the macro language described in ibm.com/support/knowledgecenter/SSQ2R2_14.2.0/… hoping that a package contains macros named BINDA, STRIT and EXPR - then with a high probability it would be the prototype of the one I need to compile a program written in it. – Leo B. Nov 20 '20 at 22:53
  • 1
    @LeoB. Err. I do not believe the level of macro language you want is the one mentioned in the IBM link supported, as that's the description of IBM's HLASM. There is a long line of development between the original /260 Assembler (D, E or F) of the 1960s and HLASM which debuted (IIRC) in the early 1990 - quite after the package you're looking for, right? Also, there were Zillions of macro libraries. Manufacturers offered a variety of libraries for different products/usage, Third party did as well, and especially every program that offered an interface did provided its macro libraries. – Raffzahn Nov 20 '20 at 23:17
  • 1
    @LeoB. Long story short, I doubt you'll find the library without knowing what it's named and were it came from. Chances are good it's been a custom development. As there isn't 'the' library nor 'the' supplier. fir /360 macros/development. – Raffzahn Nov 20 '20 at 23:17
  • 1
    @LeoB. Well, this very much settles that the Assembler used is incompatible with the /360 assembler, as this does not allow spaces within parameters. Not back than and not now. See here: One or more spaces outside a quoted string indicates the end of the operands of a macro instruction. Thus spaces should only be used inside quoted strings. The behaviour shown would make many /360 sources fail. – Raffzahn Nov 21 '20 at 0:36
  • 1
    @LeoB. Quotation is only done by ' and only then are spaces allowed. Sublists do not differ. /360 assembler is very straight forward and handling of spaces is fundamental for compatibility, so I simply picked the first reference. Also, as mentioned, the names are very un-IBM, at least for additional packages. Usually all macros belonging to a package always start with the same prefix (Like DFH for CICS). OS is an exception. so it's rather third party - if at all, sure it's assembler, not just some other language? – Raffzahn Nov 21 '20 at 10:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.