Assembler is certainly powerful and flexible, but that should be used to make 
things easier to follow and more productive.  As an example, my structured 
programming object-oriented macro language which I used to write the IBM CICS 
coupling facility servers allowed me to code things like the following:

         USING MYOBJECT,R10
         ALLOCATE MYOBJECT

That would allocate heap storage for an instance of the object MYOBJECT, copy 
in the initial value (addressed via an A-type constant) and set R10 to its 
address (which was an interesting technique in itself).  If the MYOBJECT object 
definition was copied into the module which owned it, it generated an 
initialised copy with the structure name available as an entry point.  The 
initial value typically included method definitions which contained addresses 
of entry points in the owning module.  If it was copied into some other module, 
it generated a DSECT instead, and any fields which were not in the public 
section were automatically made anonymous so they could not be referenced by 
name.  Provided all public fields preceded all private fields, it wasn't even 
necessary to recompile any modules apart from the owner if the private fields 
were changed or extended, because the length used for acquiring storage was 
obtained from a length prefix in the initial value.

Jonathan Scott

-----Original Message-----
From: IBM Mainframe Assembler List <[email protected]> On Behalf 
Of Martin Ward
Sent: 17 February 2026 19:53
To: [email protected]
Subject: Re: Clever code to celebrate

On 17/02/2026 19:11, Seymour J Metz wrote:
> I would call it obscure. Coding instruction as DC, and not even 
> honoring instruction boundaries, serves no purpose exceptmaking it 
> harder to read.

Isn't the purpose a celebration of the power, flexibility and diversity of 
assembler?

-- 
                        Martin

Dr Martin Ward | Email: [email protected] | http://www.gkc.org.uk 
G.K.Chesterton site: http://www.gkc.org.uk/gkc | Erdos number: 4

Reply via email to