Pointers in RISC-V Assembly

preview_player
Показать описание
In this video, we translate a C program to RISC-V assembly to demonstrate how pointers are declared and referenced. We also use base instructions to set memory locations.

---

Timestamps:

00:00 Intro
00:51 RISC-V Simulator
01:33 C Source
02:27 Compiler Optimizations
03:12 Writing ASM by Hand
04:35 32 Bit ISA
05:42 Base Instructions vs Psuedoinstructions
06:30 Load Upper Immediate
08:46 Setting Pointer
10:17 Testing Program
13:38 Dereferencing Pointer
15:40 Store Word Benefits
16:26 Testing Dereference
18:37 Recap

---

RISC-V Simulator:

---
laurieWIRED Twitter:

laurieWIRED Website:

laurieWIRED Github:

laurieWIRED HN:

laurieWIRED Reddit:
Рекомендации по теме
Комментарии
Автор

Only this video preview is the best pointers explanations I have seen before 😂

Nick-xpxd
Автор

Your production is incredible, these are so many lain references

AlexanderPrussak
Автор

THANK YOU SO MUCH FOR THE VIDEOOOO, i'm so obsessed with risc-v atm 😭😭😭😭😭

bass
Автор

clicked on the video and insta-liked because of the preview alone.
thanks for the great content as always, though.

noctiflorous
Автор

Hey 👋 can you create a separate playlist for RISC-V assembly as well, I want to start watching all from the beginning and it would be so much helpful and appreciated, thanks 😊

dezashibi
Автор

You stated that you are limiting the code to base RISC-V, however the format (syntax) of the instructions you used are in fact pseudoinstructions. This is based on the RISC-V ISA specification. I tried testing your code in the RARS (RISC-V Assembler and Runtime System) and pseudoinstructions must be enabled for the code to assemble.

auralsonicwaves
Автор

Adding '#pragma GCC optimize ("O0")' to the beginning of the c-code of the risc-v simulator seems to convince it to not optimize away your example.

atoomnet
Автор

Interesting the convention for RISC-V.

mytechnotalent
Автор

ok so my stumbling upon this content is really fortuitous because I know very little about programming, but have decided to learn C and MIPS asm for the R3000 the PS1 used so I can learn to decompile Megaman Legends and Serial Experiments Lain for PS1. I don't know if you have any playstation reverse engineering stuff in the pipeline but I would absolutely LOVE that, as this is a bit overwhelming at first!

MistereXMachina
Автор

I'm really curious as to why RISC-V Assembly separates the addresses into "upper" high-order bits (most significant part) versus the low-order bits (the least significant part). Is it related to WORD alignment, I wonder?
Also, is this unique to RISC-V or other Assembly languages do it too...?

naelpontes
Автор

Beginning of video is horror but inside lot of knowledge we get

abhijeetbhor
Автор

16:06 top 2 favorite kinds of dogs! Plus, cowboy bebop is a top 10 anime as well lol

Zjk
Автор

Interesting they split the load immediate into 20 and 12. Someone was thinking about paging...

GoatZilla
Автор

im not 32 years old i'm 20 + 12!!!

flopasen
Автор

wow, what version of windows do you use? It looks like super old version?

guigomez
Автор

lui zeros the other bits in the register to 0, I guess.

johnmckown
Автор

Wtf am i doing here, I'm just a web developer.
I guess the thumbnail did the job.

Adio
Автор

Normally I can't stand youtubers sticking their dumb faces in dumb expressions on all their dumb thumbnails, but this is accurate

beecee
Автор

no soy face for the thumbnail? it would have been perfect!

mr.sunshine
Автор

why do you copy other peoples thumbnails?

sulfasolate