Rotating Registers in Assignment and Equate Statements

To define an alias name for a rotating register, use an assignment statement. The alias register name is not affected by any subsequent changes to the rotating register. See the Assignment Statements and Equate Statements sections  for more details about assignment and equate statements.

Example Defining an Alias Name in an Assignment Statement illustrates how to define an alias name using an assignment statement so that the alias name is not affected by a subsequent .rotr directive. The .rotr directive maps b[1] to general register r36. b[1] is assigned to tmp. The second .rotr directive defines the new mapping of b[1] to r33. The subsequent add instruction that refers to b[1] is currently mapped to r33. The second add instruction refers to tmp, which is mapped to r36, not r33.

Example: Defining an Alias Name in an Assignment Statement

    .rotr   a[3],b[2],c[4]
tmp = b[1]                  //b[1] is currently r36
   ...
   .rotr   b[4],c[3],d[2]
   add     b[1] = r1,r7    //b[1] is currently r33
   add     r1 = r2,tmp     //tmp = r36!