6.5h Megaproject: Coding a Virtual Machine from scratch in C
HTML-код
- Опубликовано: 6 фев 2025
- In this extremely exciting new project we will be coding our own Virtual Machine. That means creating our own virtual CPU with registers and our own simple Assembly language. We will also have virtual memory (a stack and a code segment) and possibly some IO in form of a virtual serial port or a floppy drive.
We will be coding everything from scratch and not make use of any external libraries/dependencies. Except my own. We will barely use the standard C library at all - if we need a function, we make it.
In this episode you will learn a lot about pointers, how to structure a big project and make design choices. You will also learn quite a lot about structures and different types of data structures. And of course, you'll learn the ins and outs of how a computer really works, at the low-level.
#programming #clanguage #advancedc #cprojects #virtualmachine #assemblylanguage #stack
I never thought I'll see these types of projects on yt it's mind blowing.
Hehe Im glad to hear it sumi. Spread the word :) and take care, JB
@@blackhaze3856 he's got double my number of subs, no need to parasite on me, JB
@@boomboxwagon what do you mean
This is the mental relief that I've been craving
Hehe Im glad to hear it bun, take care. JB
This channel is pure gold. Doc, I wish the channel grows fast!
Thank you martin, that's very kind of you to say. Take care, JB
I am fairly proficient in C and i have begun picking up Rust. I wanted to try learning the language by building some intensive and good peoject, then like some miracle this video popped up in my suggestions. I can't thank you enough for this Doc, my familiarity in C helps me write this in Rust with some ease. I immediately subscribed. Keep bringing more such content!
thank you rudy. that is an excellent way of using my content, JB
There is no doubt, this channel is One of the best or THE BEST channel for learning C and making advanced stuff using C. And what's the best part? Dr.Jonas seems to do everything in real time and moreover I can see the the efforts and commitment to improve your video quality (like better mic quality, Subtitles!!! And many such improvements). Just wanna say, Nan You are awesome and Thanks a lot for such content! Love you man!
Thank you norm for these kind words. Im glad that you notice (and appreciate) my improvements and that you like my content. Take care, I appreciate you. JB
Pure kernel level programming with the most efficient good ol' language C. Gold content, thank you 🎉
just saw the thumbnail and 5 seconds in and i am subscribing bruhh, just continue this type of projects in cpp, c, python, rust.
Especially Rust
Welcome to the channel, rishi. I will continue these projects in C anyway :) JB
It's fantastic, Dr. Birch. You are a real chad. These videos are real gold on YT
thanks man
The amount of effort and dedication this took is insane, respect.
Thank you danish for these kind words. Im glad you appreciate it. Spread the word :) JB
it's insane that you're doing this on RUclips, I LOVE IT THANKS
hehe you're very much welcome :) spread the word, JB
For the last couple of months, I have been struggling to find a way to balance programming and learning computer architecture. Your content will helped me achieve this in a Bob Rose way. Thank you, sir ❤❤❤❤❤
Excited to watch and follow along as you explore the less seen corners of knowledge. Truly humbled. Thank you for everything!
thank you git for these kind words, JB
Dr Your general understanding goes beyond general understanding excellent thanks
haha thank you edwin, you are very kind, JB
I Just discovered your channel. sincerely You are a GEM. I was craving 10 years ago for stuff like this, but never be late. Thanks Dr. Jonas. ❤
thank you salaman, im glad you like my content. spread the word :)
I am so glad can understand without forcing. All that study is paying off .
Estou tão feliz que consigo entender sem forçar. Todo esse estudo está valendo a pena
whats that in english?
Just found your channel ! It is impressive and amazing. Going in my master’s degree soon and haven’t really had the chance to do much C development. Your channel has given me the will to take more time on personnal projects
thats great dino. making low level popular again, JB
Best C programming channel on the whole wide internet 🔥🔥🔥
Thank you astral for these kind words, I appreciate you. JB
We need more channels like this! Let's go.
Thank you Code for these kind words. I'm glad you appreciate my channel. Spread the word :) and take care, JB
Very interesting project❤ This channel is gold for C programmers.
Thank you youtube. I appreciate you saying that. Take care, JB
Doc, you are the greatest.
There's soo much joy in my heart...seeing this project you have posted.
Thank you very much taskmaster. Im happy you like it. Spread the word :) and take care, JB
Brooooo, im in disbelief. such a magnificent effort from a magnificent man. you are such a brilliant human being; I salute you my friend. I actually was about to configure a virtual machine on bare-metal; the timing is so exquisite.
Hehe thank you backend for these kind words. JB
this channel is a gold mine
thank you mouad, thats very kind. JB
Bro you are really epic !!!!! I can't believe that you are producing videos like these and providing them for free !! Keep up the great work 💪
thank you gh, that's very kind of you to say. JB
Thanks for sharing your knowledge with us. This is quite advanced and unique! Hope to finish the vid soon.
This is sick. Thanks for sharing your knowledge.
hehe thank you nic, im glad you appreciate my content. JB
😭😭😭😭youre so talented ! Oh to code like this ❤❤ TYsm for your efforts professor !
Thank you suv for these kind words. I appreciate you and always look forward to your comments. Take care man, JB
@@dr-Jonas-Birch awww tysm 🥰
Damn bro, u r the best, i've never seen someome making good content about C like that
Thanks bob, Im happy you appreciate my content. Spread the word :) and take care, JB
@CoruscationsOfIneptitude Yes check out the 3h beginner course in the tutorials playlist. There are not many skilled C coders on RUclips, we're only three, the others are two russian guys (forgive me though if I dont want to promote my competitors). Take care, JB
those keyboard clicks sound like music to my ears. Pure bliss. Also amazing video. subscribed and waiting for more amazing content
Thank you very much harry. Welcome to the channel :) JB
I'm too newbie for this stuff but
What a nice channel
Bookmarked
I really hope it keeps in this way
I'm at Odin Project now, after that, I will come back to learn this things.
thank you mauro
Never thought I’ll see a video like this, 🎉🎉 Thanks
Thank you Abu, that's very kind. And you're very welcome, JB
in only 6.5 hours is really really impressive, good work
next time ill do two vms in 3.25 h
This is what we must call gold-mine knowledge man, you are Dr. doom
Haha thank you Ab for these kind words. JB
I love this channel... Wow 😲, a great project.❤
Thank you cedrik, that's very kind. Im happy you like it, take care. JB
Really sir your work is appreciable 🎉🎉🎉🎉
Thanks ab, Im glad you like it. JB
I appreciate your efforts,and keep doing this kinda videos..❤❤❤
Thank you Sanjay, Im happy you like it. I will carry on, for sure :) Take care, JB
I never expected this project and i was totally amazed by it...
Hehe thank you akilles. I'm glad you appreciate it. Spread the word :) and take care, JB
Thanks for this doc, take care, always!
You're welcome Alq. You take care also, JB
Thank you for such amazing content!!🎉
You're welcome, Im glad you like it, JB
I'm a web dev I never use C, it has been some time since college. But it's cool that I could follow along with you!
Yeah, Im glad you like my content even though its not much of webdev stuff :) JB
Amazing video! Really liked the packet umbrella one to.
Thanks pharao, Im glad you like my content. Too bad I couldn't carry on that project but one day perhaps. I think you would have appreciated my solution for blocking tcp syn attacks. JB
I am a fan of c&c++ and after watching the content of this channel my mind was blown..
Thanks Dr.❤❤
Hehe thank you Sud, that's very kind. Im glad you like my content. Spread the word :) JB
I have needed to see this for about a week now
hehe cd, its only been out 3 days but I get your point :) JB
Oh my Gosh, Another great video 🔥🔥
thank you Dr.Birch
You're welcome mohammad, Im glad you like it. Take care, JB
This is so cool level of programming I never will learn but always wanted, I learned Asambler on C64 , now it’s most c++, phyton and java but not low level as you. Impressive.. tutorials on this would be nice…
Thanks you stis, Im glad you like it. JB
Just incredible, keep doing
Thank you ali, Im happy you like. -JB
You a rare gem on YT
Thank you very much Dee, Im happy you like it. JB
Incredible that this is recommended to me. I feel blessed.
Hehe sometimes the algorithm gets it right. Thank you albert, Im glad you like it. Spread the word :) and take care, JB
great I always wanted to code a VM and learn more how a computer works, now with this I can do it
I'm here for the penguins and the intro 😂. Nah it's an awesome material, thanks Dr.
Thank you IA, I'm happy you like my content. And Gunther sends his regards :D JB
Dr Birch this is absolutely fantastic! Thank you so much!!!
Thank you max for these kind words. Im really happy you like my content. Spread the word :) JB
Wow, what a job.
Thank you dr.
Thank you gar, Im happy you like it. JB
Sir, thanks for all you efforts.
You're very welcome This. I'm glad you like it. Spread the word :) JB
Amazing content!
Thank you vanja, Im glad that you appreciate it. Take care, JB
Thank you for this content sir🙏🏻
You're very much welcome, Im glad you like it. JB
That's great🔥🔥
Thank you sonic, Im happy you like my stuff. Spread the word :) and take care, JB
Hey Doc. Thanks for creating this video, red ❤ from India..
You're very much welcome L, I'm glad you like it. Take care, JB
I am gonna watch whole video just for you kind sir
Thanks go, I appreciate it. JB
When you see a channel like this you must subscribe, it is the only way
Thank you matt for these kind words, we're lucky to have you! JB
wow sir wonderfull class
Thank you Sum. Im happy that you like my content. Spread the word :) and take care, JB
This vid literally taught me so much
Thats great andrew. Im glad you like it, JB
this is gold! thanksss
Thank you marcos, Im glad you like my stuff. Spread the word :) and take care, JB
It's mind blowing ❤
Thanks man
and im happy. and sad. and frustrated. and like holy fuck. I found a project. I found a magical channel. feelings of vitory, relief, and a fair bit of terror. subscribed. will watch all videos, slowly...
hehe if you watch all my one hundred-something videos I will give you a hug :) JB
Jesus, such a good content. Keep it up!
Thank you control, I'm happy you like it. Spread the word :) and take care, JB
Love it!!!!!!!!!!!!!!!!!
That's great, Sine :) Glad you like it, JB
I love this!!
hehe happy to be of service :D JB
Man you have my sub. Good job...
Thanks lab and welcome to the channel, JB
Just found your channel. Fkn great content
Thanks artist, Im glad you like it. Spread the word :) and take care, JB
Thank you very interesting!
You're welcome T, Im glad you like it. Spread the word :) and take care, JB
And all development was done in a bathroom! Amazing stuff.
srry my new appartments pretty empty as of now
Would have been great if you could discuss more of its system design parts with diagram and d then code it. Becomes much easier to understand for beginners like me
I actually did that in this episode, check the beginning. JB
Let me note some important timestamps:
3:08:35 Memory
3:24:15 execute
4:14:41 execute instr
4:15:00 mov
thank you fpn :)
Wow, this is great!!! I thought you need a team to make one.
A team would just get in my way :)
dude this is awesome
Thank you deep, Im glad you like it. Spread the word :) JB
Here we goooooo~
Yeah! :D
Thank you youtube algorithm, found a gem !!
Hehe thank you sumi for these kind words. Welcome to the channel :) Take care, JB
Instant subscribe. Jesus dude this is awesome
Thank you leon, Im glad you like it. Welcome to the channel :) JB
Hell dude... This shit is dope!
I wanna become a pro like you! Not sure when it will be me building such projects on my own 😢
Thanks aak, sooner than you think - just keep coding, JB
Amazing as always..
Thank you very much yash. I always look forward to your comments :) Take care, JB
Genius ❤
Thank you wali, thats very kind. JB
Oh damn, this actually tops what I'm doing
hehe adam, what are you doing? JB
@dr-Jonas-Birch nothing as cool as coding my own virtual machine in C... I mean it's just an entry point Library, renderless game engine core, feature Rich free game engine... Still doesn't compare though
Omg, Dr. Jonas did it again 😮
Haha I sure did :D thanks gojo, JB
leaving my comment to show my appreciation haha
Thank you miss parra, I appreciate it. JB
When comparing program pointer to break point, you need to get the pointer of the break point rather than casting its value to a program pointer. That's a good reason to never disable comparing int to pointer warnings lol
hehe true. ifigured it out eventually :) JB
Sir , can u pls make playlist on assembly from beginner to advanced?
done and done
That thumbnail kills me 😂
haha its cool right
Great
Woah !
Hehe thank you Sub, Im glad you like it. JB
you inspire me.
Thats great Dist. That was my intention. Take care, JB
@@dr-Jonas-Birch The question is, what inspires you and what gives you the motivation to keep going. Ig the community you gathered but is there anything other than that?
@@distortions you guysof course!
Thank you for the video Dr Birch. Do you have a video on how to setup an online repository like the one you have in this video? If not do you have any links/articles on how I can setup something similar?
No but I can make a video about it. It's a good idea and I have added it to my list. JB
ur very cool thank you
thank you monto, i bet you're pretty cool too :) JB
I have learned c/cpp now i am more intresting in game engine development did couple of courses on it now i want recommendation which course to watch
Try my advanced 7h course in the tutorials playlist. If you're quite at that level yet though, try the 3h beginner. JB
I'm subscribed
Thats great earn. Welcome to the channel :) JB
I've written some emulators for consoles in the past, and I'd call this more of an emulator than a virtual machine. Also, did you mean 64K of RAM? 65K seems strange (17bit address?) :) Thanks for the video.
haha i always get units mixed up, this is like the 3rd time. good that im not a mathematician, JB
We will have following registers: ax, bx, cx, dx, sp, ip then in the assembly example eax is used
Hehe sorry, old habit. I corrected myself later in that video, or maybe the next. JB
@dr-Jonas-Birch cool project anyway
brilliant stuff , why don't you code a rfc in some other video like json rfc or HTTP or TCP rfc ?
Thank you. Do you mean Request For Comments? JB
@@dr-Jonas-Birch yup exactly
Hello Dr Jonas, I am waiting for your compiler project in haskell. Remember you said few months ago
i know. ive been secretly practicing hs hehe so ill write a compiler for my vm machine code language when its done, JB
@dr-Jonas-Birch that's wonderful, I'm excited!!
You know what I am gonna do to that thing, Batman. There are no laws against Virtual Machines Batman.
Do tell, Joker.
God mode activated
Hehe thanks Mo, Im glad you like it. JB
I just found the perfect video to fall asleep with
i ll take that as a complement
@dr-Jonas-Birch yes it is!