Re: ÄɲüÁÌä



[ ¤³¤Î¥á¥Ã¥»¡¼¥¸¤Ø¤ÎÊÖ»ö ] [ ÊÖ»ö¤ò½ñ¤¯ ] [ home.html ]



Åê¹Æ¼Ô¡§ 68user @ oryo.inforyoma.or.jp on 97/9/21 06:57:13

In Reply to: Re: ¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹

posted by movem.l d0-d7/a0-a5,-(sp) @ h193.p066.iij4u.or.jp on 97/9/21 06:43:57

> ¥ª¥Õ¥»¥Ã¥È¤ÏÉä¹æÉÕ¤­16bit¤Ê¤Î¤Ç-32768¡Á32767¤Þ¤Ç¤Ç¤¹¡£

¤¢¡¢¤Ê¤ë¤Û¤É¡£¥ª¥¤¥é¤Ã¤Æ´ðÁ䬤狼¤Ã¤Æ¤Ê¤¤¤Ê¤¡¡Ä

¤¢¤ÈÄɲüÁÌä¤Ç¤¹¡£

int *base_addr = malloc( ( size_t ) 2000 );

for ( int h=0 , int *p=base_addr+100 ; p
¢³h += *p;
}

¤Ï¡¢

# $19 = base_addr

¢³¢³¢³add $8,$0,$0 ¢³¢³¢³¢³# h = 0
¢³¢³¢³addi $20,$19,1000*4 ¢³# $19 = base_addr + 1000 * sizeof(int)
Loop:
¢³¢³¢³lw $9,0($19)¢³¢³¢³ # $9 = base_addr + $19
¢³¢³¢³add $8,$8,$9¢³¢³¢³ # h += $9
¢³¢³¢³addi $19,$19,4¢³¢³ # $19 += sizeof(int)
¢³¢³¢³bne $19,$20,Loop

¤³¤ó¤Ê´¶¤¸¤Ë¤Ê¤ë¤ó¤Ç¤·¤ç¤¦¤«¡©


# º£Æü¤ÏÄɲäȤ«ÄûÀµ¤¬Â¿¤¤¤Ê¤¡(^^;

¤È¤³¤í¤Ç¡¢

> movem.l d0-d7/a0-a5,-(sp)

¤³¤ó¤Ê¹âµ¡Ç½¤ÊÌ¿Îá¤Ã¤ÆRISC¤Ç¤ÏÉáÄ̤ϸºß¤·¤Ê¤¤¤ó¤Ç¤¹¤«¤Í¡©
68000·Ï¤Ç¤âµ¿»÷Ì¿Îá¤À¤Ã¤¿¤Î¤«¤â¤·¤ì¤Ê¤¤¤±¤É(¤è¤¯ÃΤé¤Ê¤¤)