rep (Çȼ¿ ¼ÎÀÌ´õ)
rep...endrep ºí·ÏÀ» ½ÃÀÛ ÇÑ´Ù.
±¸¹®
¿©±â¼, integerReg ´Â, x ¼ººÐ³»ÀÇ ¹Ýº¹¼ö¸¦ ÁöÁ¤ÇÏ´Â Á¤¼ö ·¹Áö½ºÅÍÀÌ´Ù. ¡¸Á¤¼öÇü Á¤¼ö ·¹Áö½ºÅÍ¡¹¸¦ ÂüÁ¶ÇÒ°Í.
ÁÖÀÇ
| Çȼ¿ ¼ÎÀÌ´õÀÇ ¹öÀü | 1_1 | 1_2 | 1_3 | 1_4 | 2_0 | 2_x | 2_sw | 3_0 | 3_sw |
|---|
| rep | | | | | | x | x | x | x |
|---|
- rep ´Â Á¤¼öÇü ·¹Áö½ºÅÍ (i#)¸¦ »ç¿ëÇÑ´Ù.
- endrep ´Â, rep ºí·ÏÀÇ ¸¶Áö¸· ¸í·ÉÀÇ µÚ¿¡ µÎÁö ¾ÊÀ¸¸é ¾È µÈ´Ù.
- endrep ÀÇ ¿ÀÇÁ¼Â(offset)´Â,rep ¸í·ÉÀÇ ¿ÀÇÁ¼Â(offset)º¸´Ù Å©Áö ¾ÊÀ¸¸é ¾È µÈ´Ù.
- ps_2_sw ¿Í ps_2_x ¿¡¼´Â, rep ·çÇÁ¸¦ ³×½ºÆ® ÇÒ ¼ö ¾ø´Ù.
- ps_3_0 ¿Í ps_3_sw ¿¡¼´Â, 0 ~ 4 ·¹º§ÀÇ ¹üÀ§¿¡¼ rep ·çÇÁ¸¦ ³×½ºÆ® ÇÒ ¼ö ÀÖ´Ù.
- rep ·çÇÁ´Â, if ºí·ÏÀÇ ¿ÏÀüÇÏ°Ô ¾ÈÂÊ¿¡¼ »ç¿ëÇÏ´ÂÁö, if ºí·ÏÀ» ¿ÏÀüÇÏ°Ô µÑ·¯½Î »ç¿ëÇÑ´Ù. °ÉÃÄ »ç¿ëÇÒ ¼ö ¾ø´Ù.
- rep ´Â, Á¤Á¡ ¼ÎÀÌ´õ ¸í·É ½½·ÔÀ» 1 °³ »ç¿ëÇÑ´Ù. ´Ù¸¸, ¸í·É ½½·ÔÀ» º°·Î 1 °³ »ç¿ëÇÏ´Â endrep ¿Í ÇÔ²² »ç¿ëÇÒ Çʿ䰡 ÀÖ´Ù.
- loop ÀÇ ÃÖ´ë ¹Ýº¹¼ö´Â 255 ÀÌ´Ù.
¸í·ÉÀÇ ±â´ÉÀ» ´ÙÀ½¿¡ ³ªÅ¸³½´Ù.
StartLoopOffset = next instruction offset
LoopIterationCount = IntegerRegister.x
if (LoopIterationCount <= 0)
Continue execution after the next EndRep instruction