rep (Pixel Shader) 
Start a rep...endrep block.
Syntax
where integerReg is an integer register that specifies the repeat count in the x component. See Constant Integer Register.
Remarks
| Pixel shader versions | 1_1 | 1_2 | 1_3 | 1_4 | 2_0 | 2_x | 2_sw | 3_0 | 3_sw | 
|---|
| rep |  |  |  |  |  | x | x | x | x | 
|---|
- rep uses integer registers (i#).
 - endrep must follow the last instruction of a repeat block. 
 - The endrep offset must be greater than the rep instruction offset.
 - Repeat loops cannot be nested for ps_2_sw or ps_2_x. 
 - Repeat loops can be nested between 0 and 4 levels for ps_3_0 and ps_3_sw.
 - Repeat loops are allowed to be either completely inside an if block or completely surrounding it; no straddling is allowed. 
 - rep consumes one vertex shader instruction slot but must be used with endrep, which consumes another.
 - The maximum loop iteration count is 255.
 
Here is how the instruction works.
StartLoopOffset = next instruction offset
    LoopIterationCount   = IntegerRegister.x
    if (LoopIterationCount <= 0)
        Continue execution after the next EndRep instruction