Тёмный

Building an OS - 1 - Hello world 

nanobyte
Подписаться 23 тыс.
Просмотров 508 тыс.
50% 1

First part in a multipart series about building operating systems. In this episode, we start by writing a 'hello world' program in assembly, and then booting it from a floppy drive.
Links:
- Source code: github.com/nanobyte-dev/nanob...
- Patreon: / nanobyte
- Discord: Discord: / discord
- Transcript: nanobyte.dev/transcripts/buil...
Documentation:
- Enabling Windows Subsystem for Linux: docs.microsoft.com/en-us/wind...
- Installing Ubuntu in Windows Subsystem for Linux: tutorials.ubuntu.com/tutorial...
"Table of x86 Registers svg" by Immae is licensed under Creative Commons Attribution-Share Alike 3.0 Unported (commons.wikimedia.org/wiki/Fi...)

Наука

Опубликовано:

 

8 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 447   
@edy1219
@edy1219 11 месяцев назад
"so far our operating system does nothing and does it perfectly" top tier programming here
@dklima
@dklima 9 месяцев назад
I loved it
@HaganeNoGijutsushi
@HaganeNoGijutsushi 9 месяцев назад
The only time when an OS will be 100% bug and vulnerability free.
@edy1219
@edy1219 9 месяцев назад
@@HaganeNoGijutsushi yeah
@supa3ek
@supa3ek 9 месяцев назад
That would actually be a relief for it to do exactly what you expect 😀 99% of the time this doesn't happen
@hackdesigner
@hackdesigner 9 месяцев назад
Yep sounds legit. About half of the demos I'm being shown.
@Fernando-du5uj
@Fernando-du5uj 2 года назад
This is the most complete video I've ever seen on building an OS. Thank you, sir! Don't stop, please
@PoolNoodleOGAE
@PoolNoodleOGAE 9 месяцев назад
That’s what your mom said last night
@KkkKkk-re9il
@KkkKkk-re9il 8 месяцев назад
He has stopped 😢
@slowed-hut
@slowed-hut 6 месяцев назад
@@PoolNoodleOGAElmfao
@EinSatzMitX
@EinSatzMitX 5 месяцев назад
He did​nt stop here
@adityapandey9018
@adityapandey9018 2 месяца назад
@@PoolNoodleOGAEsasti backhodi
@stupossibleify
@stupossibleify 2 года назад
What a fantastic series of videos, they really tickle my tech curiousity. Everything I've been puzzled by is explained so well. Thank you for making these
@abdulelahaljeffery6234
@abdulelahaljeffery6234 9 месяцев назад
it's really rare to find quality videos in this topic. Thank you sir for this excellent demo 🙏
@kamikaze_kev
@kamikaze_kev Год назад
loved this! back in 1985 i built an 8-bit z80 computer on breadboard (with a 1k static-ram chip) and had to program the RAM chip using 8 dip-switches (no assember) just in pure binary! it took hours to write code similar to this. after writing the binary code to RAM, i would then send a signal to the RES pin on the CPU to begin the instruction pointer (IP) at zero and begin execution of the code. all i had was an array of 8 led's as my output display. the code I wrote made the led's flash from left to right and vice versa, amazing days! this brings it all back! 😊 ps. i had to clock the z80 cpu at only 1 instruction per second (1hz) to be able to see the led lights move and the z80 assembly for that code was something like: l0: ld b,7 ld a,128 l1: out 0,a rra djnz l1 ld b,7 l2: rla out 0,a djnz l2 jp l0 (program size was just 21 bytes lol!)
@satyamraj2779
@satyamraj2779 10 месяцев назад
Wow... that's quite fascinating.
@adversemiller
@adversemiller 10 месяцев назад
That's incredible, love it
@tharindudhanushka2201
@tharindudhanushka2201 9 месяцев назад
wow
@techtime3125
@techtime3125 9 месяцев назад
real programmer
@homeopathicfossil-fuels4789
@homeopathicfossil-fuels4789 9 месяцев назад
You did programming as von Neumann and the lord above us intended it, binary input, binary output, nothing else but switches and lights. A truly enlightening experience for anyone seeking the raw essence of what programming is. Its flicking switches to convince lights to blink in the right pattern.
@redaloui
@redaloui 9 месяцев назад
If anything RU-vid does good from time to time, is that he suggested this to me. I highly valuate this type of content, and as a developer and a lover of coding I have a big respect to this type of talented people, its way out of my league to do such things, even that like 25 years ago when started coding using basic 1, I had such ideas 😅, now you know the life took me, and have to pay the bills so I am a web dev, thankfully I am still in the coding family. Big love and respect bro ❤
@brickch4pel
@brickch4pel 10 месяцев назад
Absolutely adding this to the study list. I feel like this would probably be a great reference for delving further into CompSci
@yaroslavpanych2067
@yaroslavpanych2067 9 месяцев назад
Do not waste your time on this crap
@sastashroud7646
@sastashroud7646 8 месяцев назад
This is real computer science not website Makin
@NebulaDev
@NebulaDev 2 года назад
This is brilliant. All the other tutorials are messy file trees, horrible code, and hard to follow. This is perfect, easy to do, and the teacher is great. Keep going dude!
@Unfaced85
@Unfaced85 9 месяцев назад
just discovered this series , need to binge watch that now. This is so cool
@samarthtandale9121
@samarthtandale9121 Год назад
I'm literally into tears 😭 ... Overwhelmed by grateful emotions ☺️😌 ... Can't believe you put it for free on RU-vid! Thank You man, I can't thank you enough... !❣️🙏🏾🙏🏾
@thewaterwave222
@thewaterwave222 10 месяцев назад
You really sound like a bot rn
@samarthtandale9121
@samarthtandale9121 10 месяцев назад
@@thewaterwave222 That's what she said bro 😭😅
@minecraftify95
@minecraftify95 3 месяца назад
ok bot
@SpamtonFan-pc9kv
@SpamtonFan-pc9kv 2 месяца назад
@@samarthtandale9121 thats what the [[BIG SHOT]] said
@SpamtonFan-pc9kv
@SpamtonFan-pc9kv 2 месяца назад
damn thats one useless bot
@davidmarshal6729
@davidmarshal6729 9 месяцев назад
i can say nothing more about this video other the "its perfect", the best OSDev tutorial i've seen yet. AMAZING
@vynxie
@vynxie 9 месяцев назад
It's really good to see people having fun with Assembly like this. I know we live in the age of languages like Python and Assembly can be a frustrating, painfully slow, counterintuitive language at times that tests your patience and confidence when things don't work, but I think everyone who enjoys programming should learn to work with at least one instruction set and experiment with it like this. Just mess around, play with it. At the end of the day we're just kids playing with really complicated toys and making them do tricks when we program anyway.
@nebuladevelopments
@nebuladevelopments 2 года назад
Excellent Tutorial. I love how you explain everything you are doing, this is a much better tutorial then any of the others I have seen!
@LegoPossessed
@LegoPossessed 3 месяца назад
I can already see that this is going to be easy with this tutorial! PLEASE DON'T STOP, KEEP UP THE GOOD WORK!
@PrzestronnyMistrz-ly8rp
@PrzestronnyMistrz-ly8rp Год назад
this video would have saved me days of research if i knew it before i got into operating systems. Very consise and coherent, 10/10
@alicewyan
@alicewyan 9 месяцев назад
A stack is LIFO (last-in-first-out), not FIFO. The FIFO equivalent is called a queue.
@x_flies
@x_flies 9 месяцев назад
Lov u
@theocrandall
@theocrandall 9 месяцев назад
Yes I came down here to make this exact comment.
@michaelt126
@michaelt126 8 месяцев назад
at least the animations were right
@Kolundi
@Kolundi 8 месяцев назад
thank you, I was thinking the same thing !
@Learnerofthings
@Learnerofthings Год назад
Thank you VERY much for this series. I have mentioned wanting to get into OS design many times on other programming groups and been laughed at and mocked because why am I not in the kitchen making dinner lol. I've been writing in C and recently learning assembly, so now I will go back to them with an OS (after a few more years of this).
@spytonic4171
@spytonic4171 Год назад
have you completed your os?
@Learnerofthings
@Learnerofthings Год назад
@@spytonic4171 Not even close. Life got in the way, but I am picking it back up now.
@Viral757_
@Viral757_ 4 месяца назад
You explained the most complicated subject like it's a piece of cake. Hats off to you man !! This video deserves millions of likes ☘☘
@crogersdev
@crogersdev 9 месяцев назад
This is a wonderful video, friend! Thank you for doing these videos, I'm loving them!
@michaelhawthorne8696
@michaelhawthorne8696 9 месяцев назад
Nice video... Looking forward to see how this progresses... Made 4 yrs ago, I'll check your channel for other updates... Thanks for the start. 👌
@AboMazen404
@AboMazen404 2 года назад
This is gold , Thank you for the efforts
@blauesaxolotl
@blauesaxolotl 8 месяцев назад
That is the most complex "Hello, World" tutorial I've ever seen. Thank you for that
@m4rt_
@m4rt_ Год назад
Amazing video, I managed to follow along, and I even learned some more asm. I have always been kind annoyed with there being very few resources online for learning asm, so I barely know any, so nice to finally find a good resource.
@gearboxworks
@gearboxworks 9 месяцев назад
That is one of the best tutorials of a complex subject I have ever watched. Kudos! 👏
@puceno
@puceno Год назад
the title is literally the content of the the video, you are amazing :) , dont stop never
@null12346
@null12346 Год назад
Thank you for making this tutorial. Now I learned a lot of things that will be useful for me
@nightwintertooth9502
@nightwintertooth9502 9 месяцев назад
Terry Davis would be proud. Now everyone can homebrew their own temple OS.
@flopin9528
@flopin9528 9 месяцев назад
Randomly youtube recommended me this video. I wont try to build an OS but I always wondered how it works, thank you
@schvarts1177
@schvarts1177 6 месяцев назад
this video is really good i never seen a complete video like this
@10bokaj
@10bokaj Год назад
This is the perfect level of explanation for me, thanks!
@bolow
@bolow 10 месяцев назад
I love this, please keep doing this kind of tutorial
@Superwastaken1
@Superwastaken1 11 месяцев назад
This made me actually understand kind of how an is works and I already have an idea of how a kernel works too
@pythonwithpandy9200
@pythonwithpandy9200 2 года назад
Cool Thank you so much you are the best person who has explained assembly:)
@thewaterwave222
@thewaterwave222 Год назад
YOU ARE A LEGEND ONLY THIS ONE WORKED PERFECTLY!!!!! THANK YOU!!!!
@victorsalvans7418
@victorsalvans7418 9 месяцев назад
The best video for begginers about this topic!! Excellent!
@skychip7784
@skychip7784 4 месяца назад
this probably needed so much work thanks for the effort!
@masterymaster5436
@masterymaster5436 Год назад
This is truly fascinating tutorial, congratulation
@nuutti2957
@nuutti2957 9 месяцев назад
Absolutely amazing video! Thank you loads!
@Gamercat01
@Gamercat01 4 года назад
Hi! I thought this was great! I hope you'll make more some day. All the best from a fellow programmer(mostly c# :))!
@ARandomOSDever
@ARandomOSDever 2 года назад
Hey Nanobyte, you are one of the best and most underrated OSDev channels on RU-vid! You even inspired me to create a OSDev channel. Just need to find a easy to use video editor and it's done! BTW I am a Legacy BIOS Windows 10 user (and I will change to Linux in 2025)
@lambda256
@lambda256 Год назад
Why 2025?
@antonGanG
@antonGanG Год назад
@@lambda256 thats the end of support for windows 10
@ferdinandw.8952
@ferdinandw.8952 Год назад
@@antonGanG not anymore now it is end of 2023
@HustlerEli
@HustlerEli 9 месяцев назад
Dual boot to get more familiar with Linux
@thatoneguy3_
@thatoneguy3_ 8 месяцев назад
Best for creating os. Please do more videos!
@DevNugget
@DevNugget 2 года назад
Thank you so much for these videos!!
@justman7656
@justman7656 9 месяцев назад
Greatest stuff that i seen ever, man, continue plea
@pythondoesstuff5722
@pythondoesstuff5722 2 года назад
Thanks a lot sir, amazing explaination
@rahulr9301
@rahulr9301 2 года назад
just amazing!!!! in 17:11 u mentioned stack as fifo but it should be like LIFO right?
@nanobyte-dev
@nanobyte-dev 2 года назад
Yes, you are correct
@MateuszAdamowski
@MateuszAdamowski 9 месяцев назад
just noticed the same :-)
@botobeni
@botobeni 9 месяцев назад
I've been searching for ages to find something like this
@whydoesthisevenexist
@whydoesthisevenexist 2 года назад
Very underrated
@KaosPCtech
@KaosPCtech Год назад
This is great, thanks for teaching us. I thought it would have been funny if you used nano to build your os
@f23anone82
@f23anone82 9 месяцев назад
Great video, thank you. Subscribed!
@mehrdad-mixtape7970
@mehrdad-mixtape7970 9 месяцев назад
That was amazing man!
@laybackluke
@laybackluke 9 месяцев назад
I really enjoy technical low-level programming projects that present the necessary theory and definitions. I hope to see you building a compiler for a toy language from scratch one day. Or a webbrowser :)
@danielmosner5802
@danielmosner5802 11 месяцев назад
This is awesome. I watch it, and get like 50% of it. Then I search for while and I understand it more. But it was till I start building my own floppy disk OS bootloader to understand it on 100% Thank you very much for this. It made me eager to learn more!
@CunningBard
@CunningBard Год назад
I like this guy, he hesitates and still gets it wrong (13:29), but all in all good tutorial
@nanobyte-dev
@nanobyte-dev Год назад
Recording videos was really stressful, especially when I started making videos. Today, I have a better workflow which helps a bit, but mistakes still happen.
@cheeze7910
@cheeze7910 10 месяцев назад
Thanks so much for these videos!
@JtagSheep
@JtagSheep Год назад
Wow amazing tutorials, I have previously written assembly bootloaders and a basic operating system more like a shell tbh and no one really explained about the syntax of certain assembly things like $ and $$, I knew I could jump to $ for a hlt but never what the $ - $$ did in the times loop and now I do!
@maxmuster7003
@maxmuster7003 Год назад
FLIP db "blub blub" fliplen = (FLIP - $) $ is the current location in memory.
@exploitingcodes756
@exploitingcodes756 Год назад
This channel is amazing. Keep the great work, mate!
@programmieren_lernen
@programmieren_lernen 5 месяцев назад
The best Tutorial guy!
@danym-98
@danym-98 8 месяцев назад
Well structure. Thank you very much
@a.andrade345
@a.andrade345 9 месяцев назад
Thats's fck'n awesome, i'm writting a compiler and the video is sooooo usefull
@WistrelChianti
@WistrelChianti 2 года назад
Thanks! That made good sense.
@allanmingau
@allanmingau 2 года назад
just amazing
@tonkotsu_noodles
@tonkotsu_noodles 3 года назад
waiting for the next video !!!!
@NahidHasan-dz7kt
@NahidHasan-dz7kt Год назад
truly brilliant !
@trebabcock
@trebabcock Год назад
Finally, someone who appreciates micro. I absolutely love it.
@nanobyte-dev
@nanobyte-dev Год назад
It's a nice editor, but I don't use it as much nowadays, VSCode is just better. When I need a simple editor on linux, I always fallback to vim because it's always there preinstalled, and I've learned a few basic commands.
@trebabcock
@trebabcock Год назад
@@nanobyte-dev Totally understandable. I never did get productive with vim, unfortunately. But with micro, I was actually able to learn a lot of shortcuts, so I'm pretty productive. I go back and forth between that and VS Code because it genuinely is amazing.
@OriGDash
@OriGDash Год назад
@@trebabcock I Agree, My Chromebook Sucks At Running VS code, And Micro Is Much Better, Yes, Understandable.
@rigbyb
@rigbyb 7 месяцев назад
Great video, thank you very much :)
@mhamdmarch8709
@mhamdmarch8709 11 месяцев назад
The best youtube channel ❤❤
@anthonymaxsalien
@anthonymaxsalien Год назад
Badass dude really badass, this is Bill Gates level of making an OS. I will be looking forward to this. I am an Windows and Linux user so i play around with virtual machines so this should come out simple for me. Can't wait to make my own OS
@themodesttraveler745
@themodesttraveler745 2 года назад
wow i just found this its awesome .
@SFoX-On-Air
@SFoX-On-Air 9 месяцев назад
Rollercoaster Tycoon 2 was written entirely in Assembler. I cant even imagine how much work the guy put in this to make it happen.
@TheRealYiDa
@TheRealYiDa Год назад
cool videos thank you for the information
@Humble_Electronic_Musician
@Humble_Electronic_Musician Год назад
This is so cool!
@nikolaradovanovic4883
@nikolaradovanovic4883 9 месяцев назад
I love you man! Greetings from Serbia.
@qadirhussain7679
@qadirhussain7679 5 месяцев назад
This video is gold for people who want to learn something new everyday, but unfortunately we live in a world where a tiktoker easily gets millions of followers but a youtuber hardly gets any recognition.
@neroleso
@neroleso Год назад
brooooo really thanksssss keep going
@dr.deathvolt655
@dr.deathvolt655 2 года назад
This tutorials are really awesome ! i just wanted to ask, is knowledge of Data structures and Algorithms are necessary for building an OS
@nanobyte-dev
@nanobyte-dev 2 года назад
There are some areas where they are useful, like memory management, or process scheduling. Also keep in mind that when you are building an OS you don't have the standard libraries, and you may need to implement some of these yourself. The good part is that there are a lot of resources available online, so you can learn them as you go.
@dr.deathvolt655
@dr.deathvolt655 2 года назад
@@nanobyte-dev thank you for your reply, you are doing great job for the community thank you so much!!
@AwesomeAggron1000
@AwesomeAggron1000 Год назад
Do you know how you could load this onto a usb and have it working on bare metal? I tried on linux using dd command, it does find boot sector but no string prints
@authorotar
@authorotar 9 месяцев назад
Very easy to follow instructions and explanations. One factual error: a stack is a LIFO not a FIFO.
@ivankramarenko
@ivankramarenko 9 месяцев назад
its pure information, tnx u
@yashtakhtani-xn5pk
@yashtakhtani-xn5pk 11 месяцев назад
Hey quick question does this playlist include the making of your own kernel or some other kernel has been used.
@RegisMichelLeclerc
@RegisMichelLeclerc 9 месяцев назад
When using VMware, it's actually faster to use PXE than going all the way to using floppy images, you just make an empty VM with a network card and you setup your Ubuntu as a BootP server + NFS server (in the old Sun style). From there, just reboot the VM, everything else is automatic, you can jump to 64-bit mode much earlier, even before you display anything. By the way, ISO images are also easy to generate and somewhat more "portable" than floppy images.
@alejandrocaviellesmartin1328
@alejandrocaviellesmartin1328 2 месяца назад
Very good videos dude, congrats! The stack is LIFO Last In First Out not FIFO 😂
@twobob
@twobob 9 месяцев назад
Quality overview
@gamedevunity3dliviopanizzi170
@gamedevunity3dliviopanizzi170 2 месяца назад
great job bellissimo molto interessante
@momosaleh2400
@momosaleh2400 9 месяцев назад
Great Video
@RaceCar2352
@RaceCar2352 Год назад
Thank You very much
@TheSecretDev
@TheSecretDev 2 года назад
im your 700th sub!!
@HediDev
@HediDev 2 года назад
Good video Sir ! Btw do you recommend any books about things I should learn to better understand your tutorials ?
@nanobyte-dev
@nanobyte-dev 2 года назад
You can start with reading from the OSDev wiki, or following some text tutorials which will help you get started. The brokenthorn tutorial was my favorite. If you want to go into more depth and more theory, there are 2 great books that always get recommended, Modern Operating Systems by Andrew Tannenbaum and Operating System Concepts by Silberschatz. These are really good for theory, but maybe a bit difficult in practice. I know there is a good one about Minix, but haven't read it. I haven't really read any book related to operating systems (just partially read Tanenbaum's), but I would like to do that because I'm sure there are many things I could learn. I'm hoping to come back to this question in the future and come up with a better answer.
@HediDev
@HediDev 2 года назад
@@nanobyte-dev thanks ! I will take a look at these .
@billy-cg1qq
@billy-cg1qq 8 месяцев назад
When you started talking about memory segmentation and referencing a memory location, is that what is known or referred to as virtual memory?
@andreycwb
@andreycwb 9 месяцев назад
Wow, everything in 23 minutes, it took me several days, weeks, to find info and figure out how to create a bootloader exactly like this 17 years ago in the 2000s internet
@makidoko
@makidoko 9 месяцев назад
17:04 *LIFO (Last In First Out). The FIFO is more for stream actions.
@Aemyl_
@Aemyl_ 9 месяцев назад
very informative
@2EZShadow
@2EZShadow 7 месяцев назад
I actually followed this tutorial on android😂 Excellent tutorial 👍❤
@CEJOPawHAR
@CEJOPawHAR 7 месяцев назад
There is probably absolutely no way you are making an OS on Android unless probably if you got an extremely high-end Phone.
@2EZShadow
@2EZShadow 7 месяцев назад
@@CEJOPawHAR Samsung Galaxy A42 5G
@nvn1413
@nvn1413 9 месяцев назад
This is GOLD
@ferdinandw.8952
@ferdinandw.8952 Год назад
i couldnt get qemu installed on kali purple so i used Virtualbox else everything was GREAT!
@garciafons1166
@garciafons1166 2 года назад
How can I use this to create a bootable stick? It works with qemu, but not with Virtualbox, and when right-clicking on main_floppy.img, choosing 'create bootable stick and then trying to boot from the stick, my laptop tells me it has an invalid partition table. In spite of that, I love the video and look forward to seeing the other parts of the series as soon as I got my problems fixed!
@nanobyte-dev
@nanobyte-dev 2 года назад
Whatever is showing that error message expects the raw image to have a partition table (MBR or GPT) and one or more partitions; the main_floppy.img image doesn't have any of that. That's why you are seeing that error. For best results, write your image with DD (be very careful with it though, you can easily overwrite your own data) or some tool that supports writing in DD mode (such as Rufus). Please note that the image doesn't currently have any filesystem, so your host OS won't be able to read it. I add a file system in Part2 (FAT12). Also, make sure you have Legacy booting enabled. This won't work with UEFI.
@garciafons1166
@garciafons1166 2 года назад
@@nanobyte-dev Oh, yes, I guess I should have watched the second episode first... Thank you so very much!
@giornikitop5373
@giornikitop5373 9 месяцев назад
seems good. although, in diagram @9:29, i don't remember index registers (si,di), bp, sp, having a 8bit half counetrpart, they are 16bit only.
@sensor
@sensor 9 месяцев назад
No jk, fastest subscription I have done in my life. Literally 1 min after seeing the thumbnail.
@ryuen-vn8em
@ryuen-vn8em 9 месяцев назад
17:06 should it not be a filo manner?The stack works like first in last out or?
@sarankarthik8896
@sarankarthik8896 4 месяца назад
What are the set of API's that you have used , please mention all of it
@DevTICoders
@DevTICoders 2 месяца назад
How to install this system on raspberry pi?
Далее
Building an OS - 2 - Reading from the disk
35:36
Просмотров 92 тыс.
Comparing C to machine language
10:02
Просмотров 5 млн
x86 Assembly: Hello World!
14:33
Просмотров 1,4 млн
I've never seen ANYTHING like this before... Temple OS
17:57
how NASA writes space-proof code
6:03
Просмотров 2,1 млн
How does an OS boot? //Source Dive// 001
50:22
Просмотров 376 тыс.
Making Simple Windows Driver in C
7:26
Просмотров 315 тыс.
How To Make An Operating System
8:31
Просмотров 1,9 млн
Неразбиваемый экран!
0:23
Просмотров 45 тыс.
😱НОУТБУК СОСЕДКИ😱
0:30
Просмотров 3,3 млн