logoalt Hacker News

Bare metal programming with RISC-V guide (2023)

24 pointsby todsacerdotilast Saturday at 11:38 AM2 commentsview on HN

Comments

dlcarriertoday at 9:00 AM

Playing around with assembly language on a RISC CPU is pretty fun, because there's only a few instructions to keep track of. Assembly language is like a puzzle game, with discrete values for the size and runtime of every instruction, making it easy to compare execution strategies and choose the best one. Something like AMD64 has so many instructions that it's difficult to figure out when to use each specific variation, let alone what resources they use. RISC, on the other hand makes everything straightforward.

Treating every programming task like a speed run challenge isn't particularly productive, so playing around with it theoretically doesn't provide a useful skill, but for the tasks where resource usage does matter that much, hand written Assembly language really does shine.

sylwarelast Saturday at 12:03 PM

Everything RISC-V is kewl.