I'm doing SPARC assembly. Here's some of my code:
convert:
save %sp, -96, %sp
mov %i0, %l0 !%i0 has a long array
mov %i1, %l1 !%i1 has a char array
process:
ld [%i0], %o0 !maps firstArray[0] to %l0
mov 10, %o1 !maps 10 to %o1
call .div !divide by 10 to get 10s place
nop
mov %o0, %l3 !stores result in l3
stb %l3, [%i1] !stores result in the second array
mov %l3, %o1 !checking contents after calculation
call printf
nop
printf causes an error, and I'm not sure why. I tried this with several of the local registers. I need it to check my results. What should I do?
Also I'm not actually sure if my way of implementing the parameter arrays is correct, but I wasn't getting this error before I added the printf statement.