Question: Where is my mistake? Convert the following C program to assembly. Test code checks it. uint16_t b_func(uint16_t u16_a, uint16_t u16_b, uint16_t u16_c) { return u16_a

 Where is my mistake? Convert the following C program to assembly.

Test code checks it. uint16_t b_func(uint16_t u16_a, uint16_t u16_b, uint16_t u16_c) {

Where is my mistake?

Convert the following C program to assembly. Test code checks it. uint16_t b_func(uint16_t u16_a, uint16_t u16_b, uint16_t u16_c) { return u16_a - (16_b & u16_c); mi00 void reg_assign_ex_1(void) { 16_b = b_func(u16_b, u16_a, BxDE49); } // End. Code .text ;; void reg_assign_ex_1(void) { _reg_assign_ex_1: global _reg_assign_ex_1 Write assembly which implements the C given above. 1 mov _u16_b, we 2 mov _u16_a, w1 3 mov #OXDE49, W2 5 call _b_func 6 and we, W2, W3 7 sub wi, W3, WO Running test... Expected location: return. Actual location: return. Testing value of u16_a... Expected data: exF391 (62353). Actual data: exF391 (62353). Testing value of u16_b... Expected data: @XDB2F (56111). Actual data: @XAD30 (44336). FAIL. Convert the following C program to assembly. Test code checks it. uint16_t b_func(uint16_t u16_a, uint16_t u16_b, uint16_t u16_c) { return u16_a - (16_b & u16_c); mi00 void reg_assign_ex_1(void) { 16_b = b_func(u16_b, u16_a, BxDE49); } // End. Code .text ;; void reg_assign_ex_1(void) { _reg_assign_ex_1: global _reg_assign_ex_1 Write assembly which implements the C given above. 1 mov _u16_b, we 2 mov _u16_a, w1 3 mov #OXDE49, W2 5 call _b_func 6 and we, W2, W3 7 sub wi, W3, WO Running test... Expected location: return. Actual location: return. Testing value of u16_a... Expected data: exF391 (62353). Actual data: exF391 (62353). Testing value of u16_b... Expected data: @XDB2F (56111). Actual data: @XAD30 (44336). FAIL

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!