Building an OS - 3 - The FAT file system

preview_player
Показать описание
We continue writing our bootloader, and we learn to read a file from a FAT disk.

Tools:

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

You actually move faster than I can type. I type pretty fast. I actually find this refreshing compared to other channels that I have to pump up to double-speed to keep up with me.

Also, thanks for going beyond the bootloader section of teaching OS development. Not many video series' make it that far.

treytomes
Автор

Hands down, this is one of the best explanations I have come across so far!

asharneyaz
Автор

these videos are amazing, the best osdev content on youtube!
awesome job!!

bro-figc
Автор

What an amazing series. I discovered your channel this week and I'm learning a ton. A while ago I implemented a much simplified FAT file system (each entry in the FAT was one byte instead of 12 bits, and I didn't do subdirectories) on a homebrew 6502 computer storing files on serial eeproms, but doing FAT 12 is very cool, and I'm learning a ton from your videos. I'm going to try and run this on my 486 once I find the time to hook it up.

wkjagt
Автор

This is incredible, thank you :) I just wanted to see some of how an OS is built in practise, as in university it was all quite abstract. I will not ever build one myself, unless for the fun of it. But my curiosity is being sparked perfectly by this

bad-at-art-games
Автор

Thank you, very great article. I remember writing my own OS 25 years ago. You are master BTW ;)

radeksmola
Автор

This has been so far a most enjoyable series. Thank you. I'll be interested to see how far you take it, and whether you delve into real-time. I'm a retired software engineer who has written bare metal OSs (no file systems!) for embedded instrumentation starting with a 6502 microprocessor in the 1980s. I also wrote an OS for an 80186-based WiFi product in about 1995 (well, it was 802.11 frequency hopping, before the WiFi term was coined) - this was an example in how *not* to write a real-time OS/application because I became unnecessarily mired in locks/semaphores protecting unnecessary critical regions. Eventually I pursuaded my bosses to let me re-engineer it, and the company was almost immediately sold off. Not sure what that says about life, the universe and everything.

adrianstephens
Автор

Thanks for this amazing series!
Funny story I just searched for 1 hour why my kernel wouldnt print Hello world. I accidently mistyped dx instead of ds just infront of the jump instruction to the kernel. Therefore, he wasn't in sector 0x2 but in sector 0x0

somethingwithtech
Автор

I want to take a minute to appreciate your music choice 🤩

ashajjar
Автор

This is definitely the best os development content i have seen so far, where did you find out how to do all this?

thecodingpress
Автор

Thank you, your explanation is one of the best and it serves perfectly as a complementary to other materials

SergeySergey-ks
Автор

I think I have lost track. It could be that code part is going really fast and I am not totally sure why we do the things we do. I felt the same in episode 2. Maybe it would benefit to keep reminding us why we do the things we are doing to not loose track.
Otherwise, I Imagine that it takes a lot of time what you are doing and I gratefully thank you to put in the effort and creating such helpful videos. Cheers.

thomascarlsen
Автор

I hope the file system can lose weight…

NotAGrApe
Автор

i dont get it, how do i get "root dir size"?

Scaik
Автор

I think there's a mistake. in 6:32 the table shows 1 sectors per cluster, but in 9:51 you wrote that we have 2 sectors per cluster.

UltimusTheSoldier
Автор

Ah, the wonderful days of bios interrupts.

At least it saves you from spending a week writing a disk driver 🤣

lens
Автор

hey, i think i managed to fix your hard-coded equation for the sector number! i did have to shorten and remove a couple of my message strings at the end, but eventually i got it to fit, and WORK ON REAL HARDWARE!

just replace this:
```asm
mov ax, [kernel_cluster]
add ax, 31
```
with this:
```asm
mov ax, [kernel_cluster]
sub ax, 2 ; Clusters start at 2

; Multiply by sectors per cluster
movzx cx, byte [bdb_sectors_per_cluster]
mul cx ; AX = (cluster - 2) * sectors_per_cluster


; Add the data section start
add ax, 33
```

this actually calculates the sector number instead of making it a hard coded value. tested and working on a 16 GB pendrive. let me know if i'm wrong :)

neksodebe
Автор

Hi sir, i have carefully followed your instructions but when i run make command i get the following error :make: *** No rule to make target 'tools/fat/fat.c', needed by 'build/tools/fat'. Stop. Could you please guide me through it.

indrakumar
Автор

I love how the number of comments is dropping off the further in we get :D Just about hanging in there on the understanding of these.

WistrelChianti
Автор

Hi, where can I learn more about Assembly?

nizambhagaskara