Here's the C representation of what I'm trying to do in RISC-V assembly:
printf ("x=%d\n", x);
Here's the C representation of what I'm trying to do in RISC-V assembly:
printf ("x=%d\n", x);
https://godbolt.org/ is an interesting site. If you paste in c
code, it can be transfered into others, such as RISC-V assembly. The sample c
code is available from menie.org/georges/embedded/small_printf_source_code.html. It does work. Good luck.
Here is a very simple printf (actually only integers and strings and no advanced formatting)
It is not my code - it is tiny ptinf from the atolic studio. But it is a good base to implement something simple but more decent.