Answered step by step
Verified Expert Solution
Question
1 Approved Answer
instruction meaning add regl, reg2, reg3 regl = reg2 + reg3 sub regl, reg2, reg3 regl = reg2 reg3 div regl, reg2, reg3 regl =
instruction meaning add regl, reg2, reg3 regl = reg2 + reg3 sub regl, reg2, reg3 regl = reg2 reg3 div regl, reg2, reg3 regl = reg2/reg3 mul regl, reg2, reg3 regl = reg2 * reg3 muli regl, reg2, x regl = reg2 *r, where x is some integer addi regl, reg2, x regl = reg2 + x, where x is some integer subi regl, reg2, x regl = reg2 x, where x is some integer divr regl, reg2, x regl = reg2/x, where x is real, truncates result mov regl, reg2 regl = reg2 label: create a reference label in the code name: .type, value create .type variable in RAM where name = value lw reg, RAM_source move word from RAM to a register sw reg, RAM_source move word from register to RAM la reg, RAM_source move address of RAM to a register sa reg, RAM_source move address in register to RAM b label jump to a label in the program beq reg1,reg2, label jump to label if regl = reg2 blt reg1,reg2,label jump to label if regl reg2 bqe reg1,reg2, label jump to label if regl > reg2 ble reg1,reg2,label jump to label if regl #include int arr[] int arr_len = {10, 20, 30, 40, 50, 60, 70}; = sizeof(arr) / sizeof(arr [0]); void reverse Order (int arr [] , size_t arr len) { int rev-arr (arrlen; //Reversed array for (int i = 0; i reg2 bqe reg1,reg2, label jump to label if regl > reg2 ble reg1,reg2,label jump to label if regl #include int arr[] int arr_len = {10, 20, 30, 40, 50, 60, 70}; = sizeof(arr) / sizeof(arr [0]); void reverse Order (int arr [] , size_t arr len) { int rev-arr (arrlen; //Reversed array for (int i = 0; i
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started