💾 Archived View for siiky.srht.site › wiki › v.chibiakumas.riscv_assembly_programming.gmi captured on 2024-06-16 at 13:03:39. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-09-08)

-=-=-=-=-=-=-

ChibiAkumas, "RISC-V Assembly Programming"

siiky

2023/05/05

2023/05/05

2023/05/12

video,programming

https://odysee.com/@ChibiAkumas:7/Learn-Risc-V-Assembly-Programming---Lesson1-_-For-absolute-beginners!:c

https://odysee.com/@ChibiAkumas:7/RISC-V-Lesson-2---The-stack-and-conditions:a

https://odysee.com/@ChibiAkumas:7/Risc-V-Assembly-Lesson-3---Bit-ops-and-more-maths!:9

https://yewtu.be/watch?v=bEUMLh2lasE

https://yewtu.be/watch?v=rvhDyJVuAzk

https://yewtu.be/watch?v=mV8HUKxLRxI

Set of videos on RISC-V assembly programming.

https://www.chibialiens.com/riscv

https://www.chibialiens.com/riscv/RiscVCheatsheet.pdf

Instructions

Addressing

Stack

The RISC-V has no instructions to manipulate the stack specifically, one has to load/store and update the sp in two instructions.

Note on load immediate

If I'm understanding this right, because of how instructions are encoded (fixed size? as opposed to variable size as in x86), a "load immediate" instruction can't load a full word in a single "command"(?), because each instruction, including its arguments, is encoded as a word (again, if I'm understanding this right).

Because of that, the li instruction must be decomposed in two (generally I suppose; probably by the assembler). For example (assuming rv32):

li a0, 0xABCD0123

Must be something like:

lhi a0, 0x123 # this doesn't actually exist
lui a0, 0xABCD0