conditional macro assembler as in (readable form):
 
.EXTRM   ANOP                      TERMINAL EXCLUDES DEFINITION 
.*                                                              
&A1      SETA  1                                                
&C1      SETC  '&EXCNT'                                         
&@SYS    SETC  'EXCL&SYSNDX'                                     
&@SYS    DC    H'&C1'              EXCLUDES COUNT                
.*                                                               
.EXLOOP  AIF   (&FLHEX).@EXHEX                                    
&A2      SETA  &@EXCLUD(&A1)       CONVERT EXCLUDES TO HEXADECIMAL
&A3      SETA  &A2/16                        <-- modulo 16 part 1               
      
&C1      SETC  '&HEXVAL(&A3+1)'                                   
&A3      SETA  &A2-(&A3*16)                  <-- modulo 16 part 2               
      
&C2      SETC  '&HEXVAL(&A3+1)'                                   
&@EXCLUD(&A1) SETC  '&C1&C2'                                      
.@EXHEX  DC    XL1'&@EXCLUD(&A1)'  EXCLUDED                       
&A1      SETA  &A1+1                                              
         AIF   (&A1 LE &EXCNT).EXLOOP                             
&@SYS    SETC  'EXMK&SYSNDX'                                      
&@SYS    DC    XL2'FFFF'           END OF EXCLUDES MARKER         
.*                                                                
         MNOTE *,' COUNT OF TERMINALS EXCLUDED = &EXCNT'          
&@NZ     SETC  'EXTRMOK'                                          
         AGO   .EXCNTL             END OF TERMINAL EXCLUDES       
.*                                                                
.******************************                                   
.*                                                                
.EXCLEND ANOP                      END OF TERMINAL EXCLUDES BLOCK 
&@NZ     SETC  'EXCLOK'                                          
.EXDONE  AGO   .EXCNTL                                            
.* 
 
<etc.>
 
Cheers. 



On 29/04/2020 03:05, Paul Gilmartin wrote:
> On Wed, 29 Apr 2020 02:57:23 +0100, CM Poncelet wrote:
>
>> ... but that's the only way to do it in conditional macro assembler; so
>> what me worry about 3GL's? :)
>>
> What hardware?  Doesn't Divide leave the quotient in one register and the
> remainder in an adjacent one?
>
>> On 28/04/2020 10:46, David Crayford wrote:
>>> No worries. FWIW,  I think using the // modulo operator would make
>>> your code less verbose and complex ;)
> -- gil
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
> .
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to