Nios/increment align

From ASMBits

Write a function that increments a 32-bit word located in memory. The location to modify is passed as the first parameter to the function. This pointer is not necessarily 4-byte aligned, but your routine must only do properly aligned accesses.

void inc (int* p);

Expected solution length: Around 20 lines.

Sample Input

 Pointer: .word 1234

Sample Output

(memory changed to 1235)

Write your solution here

Upload a source file...