我目前正在尝试将do - while循环从C转换到MIPS,当涉及到分支测试时,我有点困惑。 我尝试将C语言转换为MIPS的代码如下: do{
} while(x != 0) 在mips中我声明 loop:
# and down here I should be translating while(x !
int strlen( char* string ) { while( *string != ‘\0’ ) { count++; return count;我只是在做这些...下面是MIP代码...li $t0, 0 # initialize the count to zerolbu $t1, 0($a0) # load the next character into t1
beqz $t1, exi