question how do I add this R0 <- c ?
Question: a = 5; b = 10; c; //Create the assembly code to translate the following if statement if ( a <= b ) { c = a + b -3; } R0 <- c AREA | .text | , CODE, READONLY EXPORT __main a EQU 0x20000000 b EQU 0x20000004 c EQU 0x20000008 __main ; a = 5 MOVS R0, #5 LDR R7, =a ;first address in SRAM STR R0, [R7] ;b = 10 MOVS R1, #10 LDR R7, = b STR R1, [R7] ; if a<=b ; then c = a+b -3 LDR R7, = a LDR R0, [R7] CMP R0, R1 ; if R0 is equal or less ; if it flags then jump if not do the condition c = a + b -3; BNE endif1 ; branch not equal ;write the condition LDR R7, =a ; load the value of a LDR R0, [R7] LDR R7, =b ; load the value of b LDR R1, [R7] ADDS R0, R1 ; a+b SUBS R0, #3 ; (a+b) - 3 LDR R7, =c ; store result in c STR R0, [R7] endif1 done B done END