0% found this document useful (0 votes)
58 views1 page

While

This document describes a macro that can increment register X by the TIXR operation. The macro takes in two parameters, the amount to increment X by and a counter, and uses a WHILE loop to perform the TIXR operation that number of times. When the macro is called with a value of 0 for the amount, it will not generate any code in the expansion.

Uploaded by

Mohamed Med
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views1 page

While

This document describes a macro that can increment register X by the TIXR operation. The macro takes in two parameters, the amount to increment X by and a counter, and uses a WHILE loop to perform the TIXR operation that number of times. When the macro is called with a value of 0 for the amount, it will not generate any code in the expansion.

Uploaded by

Mohamed Med
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

It is also perfectly OK is a macro doesn't even generate any code; for

example, consider the macro to lay in code for incrementing register


X via the TIXR operation.

MACRO
&INIT INCRX &AMT
&CNT SET &AMT
WHILE (&CNT GT 0)
TIXR X
&CNT SET &CNT - 1
ENDW
MEND

Then the call


INCRX 4
has the expansion

. INCRX 4
TIXR X
TIXR X
TIXR X
TIXR X

and the call


INCRX 0
has the expansion

. INCRX 0

You might also like