TIL: In a proportional font, an assembler macro looks like modern poetry.
On Thu, Oct 22, 2020 at 5:08 PM Steve Smith <[email protected]> wrote:
> Submitted for your consideration...
>
> MACRO
> &LABEL #REVSTR &STR
> &ISTR SETC DEQUOTE('&STR')
> &L SETA DCLEN('&ISTR')
> .*
> &A SETA &L
> .LOOP AIF (&A LT 1).DONE
> &OSTR SETC '&OSTR'.'&ISTR'(&A,1)
> &A SETA &A-1
> AGO .LOOP
> .*
> .DONE ANOP
> DC C'&OSTR'
> &LABEL EQU *-1,&L
> MEND
>
> E.G.:
>
> 3161 *
> 3162 #TAG #REVSTR 'IKJTCB'
> 3163+ DC C'BCTJKI'
> 3164+#TAG EQU *-1,6
> 3165 #DOG #REVSTR 'The quick brown fox jumped over the lazy dog.'
> 3166+ DC C'.god yzal eht revo depmuj xof nworb kciuq ehT'
> 3167+#DOG EQU *-1,45
>
> --
> sas
>
--
zMan -- "I've got a mainframe and I'm not afraid to use it"