You Can Learn RISC-V Assembly in 10 Minutes | Getting Started RISC-V Assembly on Linux Tutorial

preview_player
Показать описание
SQUAD! Welcome back! In this video, we talk about the RISC-V processor architecture. RISC-V was created as an open source processor architecture to get away from the models that Intel and ARM had been using in charging royalties for their process architectures. We talk about how to write a simple "Hello World" for this architecture, as well as how to emulate a RISC-V process on a non-RISC-V system.

Drop a like and subscribe to be alerted about new videos!

🏫 COURSES 🏫
Рекомендации по теме
Комментарии
Автор

I did some mips at school. Assembly was fun to mess around and get close to the architecture, but I definitely enjoy the benefits of modern languages like return types.

gljames
Автор

Just subscribed yesterday after finding your other video while searching for a riscv video. And today you upload a riscv one. What a coincidence 😂. I'm really appreciating your video btw.

donghyunshin
Автор

Nicely done and explained. Only thing I personally would change is, that I would use -ld and not -gcc to just make clearer, what is happening. What you actually call is the linker, not the C-Compiler.

Nightwulf
Автор

lmao this was so fast but it saved me from 2 weeks of not figuring out how to progress in my CPE assignment so thank you a million for the help. My prof assumes we know everything

Gigaamped
Автор

The length of the ascii string is 12 IMHO. (was 13 with comma). It is accessing (and printing) one more character, potentially beyond process' address space, I am guessing ELF executable is padded to 512 byte blocks or something. Methinks you could get an exception from kernel if your 13th byte is outside process space.

michalkupczyk
Автор

how did you run a risc-v compiled executable on your host machine directly like "./hello" without passing it to qemu-riscv64? Is there some trick that your Linux host is using that I'm not aware of?

kkenzuro
Автор

I would love more videos on RISC-V. Cheers

xcde
Автор

Looking forward to more videos on RISCV! Can you make a getting started video, with resources for the interested to explore on their own? Also any cheap hardware to run risc programs directly?

aakashhemadri
Автор

my last contact with assembler was in early 2000s, hobbysticaly playing around 6502 connected to rest of c64 peripherials.
Clearing screen was much more fun when one could write zeroes directly in the memory. Yeah, there was a kernal, but who would care ;p.
Now it's 2022 and i am trying wrap my head around concept of writing in asm but using operating system's API to do heavy lifting.
And riscv, fully open source ISA, future is now old man ;p
Thanks for great video, was bit too short, but definetely conveyed concept :)

lis
Автор

Great video! I had a question maybe you could answer. Wouldn't the li instruction be better than using addi when one of the operands is 0? Like, instead of "addi a7, zero, 64", you could just do "li a7, 64".

kevinescobedo
Автор

Cool stuff! Looking forward to the next videos!

BenjaminEggerstedt
Автор

Can you drop in what the compiled opcode bytes look like? Curious to see how the compiler outputs the memory address and the opcode bytes... I've done a lot of development in HLL but assembly only on 65C816-class CPUs.

JonRowlison
Автор

TOTALLY AWESOME! The coding in RISC V looks quite neat. Could you write THE SAME thing for an ARM 64, like it would compile on a Raspberry Pi4 on Linux? That way it would make it super-easy to learn the differences of the basic assembly infrastructure between those processors. Do the ARM64 people also have a convention with 8 function parameters to start with, or it comes on the stack? Also, you MAY have done this already, and in that case, could you point me to that Hello World ARM Assembly video? I'm such a newbie... THANK YOU SO MUCH. I really like your low-level-learning series, it always comes in small chunks that one can really understand...

hstrinzel
Автор

Hello, as usual nice video. Just a small question, is -static really required when linking these examples?

AlessioSangalli
Автор

This typical person who loves retro music like "Astrophysics" channel, which is my taste too :)

KangJangkrik
Автор

I wish you showed how to set up and invoke QEMU, and where to get images.

OriginalJetForMe
Автор

Looking forward for more tutorials on RISCV .
It would be helpful if you can reduce your pace a bit.(I felt it was a bit fast)(just a friendly suggestion)

parsishashank
Автор

The miscounting of string length here highlights the general issue of having to count the string length manually, which is already difficult to get right at 12 bytes. Are there any tools in the compiler or IDE set-up to automate this counting for longer texts etc. ?

sudlow
Автор

make more of RISC-V, i wnat ot learn it.

funkyboy
Автор

Also - I see you used section 3 of the manual for exit(). I haven't really done much Linux syscall programming but shouldn't we check section 2 in this particular case?

AlessioSangalli