I love RISC-V assembler.<p>I did a bit of x86 as stuff 20 years ago but hated it, now I wanted to teach my daughter some c and assembler and was thinking between arm and riscv, but riscv is just a joy to teach (I made a riscv assembler boardgame to help with the task <a href="https://punkx.org/overflow/" rel="nofollow">https://punkx.org/overflow/</a>)<p>Recently I was rewatching Hackers(1995) and I also got excited about the same quote:<p>> “RISC architecture is going to change everything.” — Acid Burn<p>After spending some time with esp32s and riscv assembler, I think its more true than before :)<p>If you havent given it a try yet, there are many articles like the one, and also projects like <a href="https://luplab.gitlab.io/rvcodecjs/" rel="nofollow">https://luplab.gitlab.io/rvcodecjs/</a> or <a href="https://riscv.vercel.app/" rel="nofollow">https://riscv.vercel.app/</a> where you can play with it, or even make your own emulator by learning from other emulators like <a href="https://github.com/OpenMachine-ai/tinyfive/blob/main/machine.py">https://github.com/OpenMachine-ai/tinyfive/blob/main/machine...</a><p>this cheatsheet is also very useful:
<a href="https://www.cl.cam.ac.uk/teaching/1617/ECAD+Arch/files/docs/RISCVGreenCardv8-20151013.pdf" rel="nofollow">https://www.cl.cam.ac.uk/teaching/1617/ECAD+Arch/files/docs/...</a>
68000 is, in many ways, the pinnacle of assembler for programming, but RISC-V is pretty fun, too. I hope RISC-V tempts a few more people to try asm programming (again).
RISC-V, being an ISA worldwide royalty free standard, is meant for assembly writting. The main reason, above the "comfort" reason of C and similar, was ISA abstraction which has no meaning in the RISC-V realm. The middle ground is those very high level language interpreters (python/lua/ruby/javascript/etc) written directly in RISC-V assembly (without abuse of any assembler preprocessor, ofc).<p>I am currently writting my own rv64 on x64 virtual machine process, to code my programs in rv64 and not anymore in x64 in order to be "real hardware ready".<p>BTW, anybody knows a EU based distributor of milk-v duo boards with the cv1800 SOC (the one without ARM cores and a rv64 MCU) which I can contact using my domestic email server?
> ProTip: Hexadecimal literals are prefixed with 0x.<p>I love the idea that someone could get to this page and not already know that!<p>Also this nicely highlights my pet peeve with assembly:<p><pre><code> add rd, rs1, rs2 # rd = rs1 + rs2
</code></pre>
It's very difficult to remember which parameter is the destination etc. IMO it would be much nicer if assembly had just a <i>little</i> more syntax for that sort of thing. E.g.<p><pre><code> rd = add rs1, rs2
t0 = li 5
</code></pre>
Just so the destination register is obvious. Ah well, nobody's going to do that. Assembly parsing is a total mess; there's no official grammar or anything - it's just "what GCC/LLVM do".