![Infineon Technologies XC2200 User Manual Download Page 211](http://html1.mh-extra.com/html/infineon-technologies/xc2200/xc2200_user-manual_2055439211.webp)
XC2200 Derivatives
System Units (Vol. 1 of 2)
Central Processing Unit (CPU)
User’s Manual
4-73
V2.1, 2008-08
CPUSV2_X, V2.2
Note: Bit USR0 has been a general purpose flag also in previous architectures. To
prevent collisions due to using this flag by programmer or compiler, use
‘-USR0 C0XXX’ instructions very carefully.
The following example shows a loop which is executed 20 times. Every time the
CoMACM instruction is executed, the MRW counter is decremented.
MOV MRW, #19 ;Pre-load loop counter
loop01:
-USR1 CoMACM [IDX0+], [R0+] ;Calculate and decrement MSW
ADD R2,#0002H
JMPA cc_nusr1, loop01 ;Repeat loop until USR1 is set
Note: Because correctly predicted JMPA is executed in 0-cycle, it offers the functionality
of a repeat instruction.
Table 4-26
Encoding of MAC Repeat Word Control
Code in ‘rrr’
Effect on Repeat Counter
000
B
regular CoXXX instruction
001
B
RESERVED
010
B
‘-USR0 CoXXX’ instruction,
decrements repeat counter and sets bit USR0 if MRW is zero
011
B
‘-USR1 CoXXX’ instruction,
decrements repeat counter and sets bit USR1 if MRW is zero
1XX
B
RESERVED