01.
[ C Code ]
int a = b + c;
[ MIPS ]
let 'a' be $s0
let 'b' be $s1
let 'c' be $s2
add $s0, $s1. $s2
02.
[ C Code ]
int a = (g + h) - (i + j);
[ MIPS ]
add $t0 , g , h
add $t1 , i , j
sub $s1, $t0, $t1
03.
[ C Code ]
A[300] = h + A[300] ;
Actually you may do not need MIPS code except for special devices like WI-FI . Since we do not have to compile with low level language anymore, coding in MIPS is not required in our daily life even in workplaces. Highly recommend you to study and spend more times on high level languages such as Java programming, Python et cetera....
'Study > C Programming' 카테고리의 다른 글
[C 언어] 1차원 배열 / 1D array 공부하기 ! (0) | 2018.08.01 |
---|---|
[C언어] goto statement, goto function 공부하기 (0) | 2018.08.01 |
[C언어] while loop / while statement / 자연수 더하기 (0) | 2018.08.01 |
[C언어] for loop / for statement / 자연수 더하기 (0) | 2018.08.01 |
[C언어] if~else와 switch 비교 (0) | 2018.08.01 |