[ ¤³¤Î¥á¥Ã¥»¡¼¥¸¤Ø¤ÎÊÖ»ö ]
[ ÊÖ»ö¤ò½ñ¤¯ ]
[ home.html ]
Åê¹Æ¼Ô¡§
68user @ oryo.inforyoma.or.jp on 97/9/22 03:08:41
In Reply to: ¤Ä¤Ã¤³¤ó¤Ç¤¤¤¤¤Ç¤¹¤«¡©¡©
posted by BOK @ kyt007.osk.threewebnet.or.jp on 97/9/22 02:45:51
>> add ...
>> bne ...
>> ¤È¤¢¤ë¤È¡¢bne¤Î±é»»¤¬½ª¤ë¤Þ¤Çadd¤Î¥Õ¥§¥Ã¥Á¤¬¤Ç¤¤Ê¤¤¡£¤³¤ì¤Ç¤Ï
>> ¥Ñ¥¤¥×¥é¥¤¥ó¤¬¥¹¥È¥Ã¥×¤·¤Æ¤·¤Þ¤¦¡£¤½¤³¤Ç
> ¤³¤ì¡¢°ã¤Ã¤Æ¤ë¤è¤¦¤Êµ¤¤¬¤·¤Þ¤¹¡£
¤¢¡¢¤½¤¦¤Ç¤¹¤Í¡£
bne¤Î±é»»¤¬½ª¤ë¤Þ¤Çbne¤Î¥¸¥ã¥ó¥×Àè¤ÎÌ¿Îá¤Î¥Õ¥§¥Ã¥Á¤¬¤Ç¤¤Ê¤¤¡¢¤Ç¤·¤¿¡£
>> ¤Ï¤É¤¦¤¤¤¦¤³¤È¤Ç¤·¤ç¤¦¡£¤³¤ì¤Ïadd¤¬¼Â¹Ô¤µ¤ì¤Ê¤¤¤è¤¦¤Ê¡Ä
> ¤ª¤½¤é¤¯¡¢
> ¡ö¼êÆ°¤ÇºÇŬ²½¤·¤ÆÃٱ䥹¥í¥Ã¥È¤ËÌ¿Î᤬½ñ¤¤¤Æ¤¢¤ë¤Î¤«
> ¡ö¤¿¤Àñ¤Ë¡¢ÃÙ±ä¤ò¹Íθ¤¹¤ë¤Î¤ò˺¤ì¤Æ¼¡¤ÎÌ¿Îá¤ò¤Ä¤á¤Æ½ñ¤¤¤Á¤ã¤Ã¤¿¤Î¤«
> ¥¢¥»¥ó¥Ö¥é¤¬¡¢È½ÃǤǤ¤Ê¤¤¤¿¤á¤Ç¤Ï¤Ê¤¤¤Ç¤·¤ç¤¦¤«¡£
> Ì¿Îá¤ÎÆþ¤ìÂؤ¨¤òÍÞÀ©¤¹¤ë»ö¤¬¤Ç¤¤ì¤Ð¤¤¤¤¤Î¤Ç¤¹¤¬¡£
¤È¤¤¤¦¤³¤È¤Ï
>>> ¤Ç¤â¡¢ÉáÄ̤˽ñ¤¤¤¿¤é
>>> (snip!)
>>> ¤È¡¢Ç§¼±¤µ¤ì¤Æ¤·¤Þ¤Ã¤¿¡£¤¤¤ä¤Ï¤ä¡¢±ü¤¬¿¼¤¤¡£(^^;)
¤Ï¡¢¸í¤Ã¤¿(¤È¤¤¤¦¤«Àµ¾ïÆ°ºî¤·¤Ê¤¤)¥³¡¼¥É¤¬À¸À®¤µ¤ì¤Æ¤·¤Þ¤Ã¤¿¡¢
¤È¤¤¤¦¤³¤È¤Ç¤¹¤«¤Í¡£
ºÆ³Îǧ¤ò¤µ¤»¤Æ¤¯¤À¤µ¤¤¡£
add ...
bne ...
¤È½ñ¤¯¤È¥¢¥»¥ó¥Ö¥é¤¬¼«Æ°Åª¤ËÃٱ䥹¥í¥Ã¥È¤ò¹Íθ¤·¤Æ
bne ...
add ...
¤È¤¤¤¦¥³¡¼¥É¤òÀ¸À®¤¹¤ë¤Î¤Ç¤·¤ç¤¦¤«¡£¤½¤ì¤È¤âºÇ½é¤«¤é
bne ...
add ...
¤È½ñ¤«¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¤Î¤Ç¤·¤ç¤¦¤«¡©
¤¢¤È¡¢
>> GNU Assembler¤ÏÃÙ±äʬ´ô¤ò¹Íθ¤·¤¿µ½Ò¤¬½ÐÍè¤Ê¤¤¤è¤¦¤Ç¤¹¡£
>> (¥¢¥»¥ó¥Ö¥é¤¬Ê¬´ôľÁ°¤ÎÌ¿Îá¤òÃٱ䥹¥í¥Ã¥È¤ËÆþ¤ì¤Æ¤¯¤ì¤ë)
> ºÇŬ²½¤À¤á¤Ç¤·¤¿¡£ÃÙ±äʬ´ô´Ø·¸¤Ç¤Ï¡¢
> ¡Öʬ´ô¤Î¸å¤ËÍ̵¤ò¸À¤ï¤µ¤º nop ¤òÆͤùþ¤à¡£¡×
> ¤È¤¤¤¦¥ª¥×¥·¥ç¥ó¤¬¤¢¤ë¤À¤±¤Ç¤¹¡£
¤³¤ì¤Ï gas ¤Ç¤Ï¡¢Ãٱ䥹¥í¥Ã¥È¤Ë´Ø¤¹¤ëºÇŬ²½¤¬¤¦¤Þ¤¯¤¤¤«¤Ê¤¤¡£
Loop:
¢³¢³¢³lw $9,0($21)¢³¢³¢³ # $9 = *p
¢³¢³¢³addi $21,$21,4¢³¢³ # $21 += sizeof(int)
¢³¢³¢³bne $21,$20,Loop
¢³¢³¢³add $8,$8,$9¢³¢³¢³ # h += $9
¤¬ºÇ¤âºÇŬ²½¤µ¤ì¤¿¥³¡¼¥É¤Ç¤¢¤ë¤¬ gas ¤Ï
Loop:
¢³¢³¢³lw $9,0($21)¢³¢³¢³ # $9 = *p
¢³¢³¢³addi $21,$21,4¢³¢³ # $21 += sizeof(int)
¢³¢³¢³add $8,$8,$9¢³¢³¢³ # h += $9¡¡(ʬ´ô¤Ë¤è¤ëÃٱ䥹¥í¥Ã¥È)
¢³¢³¢³bne $21,$20,Loop
nop
¤òÀ¸À®¤¹¤ë¤Î¤Ç1¥ë¡¼¥×¤´¤È¤Ë1¥¯¥í¥Ã¥¯¤Î¥ª¡¼¥Ð¡¼¥Ø¥Ã¥É¤¬
¤¢¤ë¡¢¤È¤¤¤¦¤³¤È¤Ç¤·¤ç¤¦¤«¡£
|