首页 > 解决方案 > 如何在risc-v中实现printf函数?

问题描述

这是我在 RISC-V 汇编中尝试做的 C 表示:

printf ("x=%d\n", x);

标签: cassemblymipsriscv

解决方案


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.


推荐阅读