Virtual Console and printf() //Source Dive// 003

Virtual Console and printf() //Source Dive// 003

Low Byte Productions

10 месяцев назад

66,008 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@yonahcitron226
@yonahcitron226 - 04.12.2023 00:54

Unreal. Just right level of detail. Please please continue!!

Ответить
@DrGreenGiant
@DrGreenGiant - 27.11.2023 23:34

I have a horrible idea to write my own printf that recurses on %s. Oh no what have you done lol. Really enjoying this series so far, thank you!

Ответить
@arctitan7076
@arctitan7076 - 23.11.2023 19:58

Excellent. Thanks!

Ответить
@jonb3668
@jonb3668 - 20.11.2023 01:48

This is Ben Eater level technical explanation. Really well done, I’m loving it.

Personally I’m following quite easily but when I start to bog down because of esoteric naming conventions or a gap in my knowledge, you’ve already done the hard work and I’m pulled along nicely. Excellent work.

Ответить
@DouwedeJong
@DouwedeJong - 16.11.2023 00:17

I have enjoyed this video. Thx.

Ответить
@DavidLindes
@DavidLindes - 11.11.2023 04:56

Yeah, love it. Fun stuff. So interesting (though totally understandable) that the kernel and userland have entirely different printfs... and this simple one is... so simple and elegant! Cool stuff. (Might be fun to look at the userland one sometime, though I imagine that gets much uglier...)

Also, I've used va_args stuff lots in the past... though you're right that it was mostly when writing library functions, especially wrappers for (vsn)printf. :)

Ответить
@thoup
@thoup - 09.11.2023 06:01

Goated.

Ответить
@kurusb7792
@kurusb7792 - 08.11.2023 18:33

Why are letters so legible in thumbnail but so fuzzy in the video, I mean why r letters so fuzzy in the video when they r so crisp in the thumbnail? Secondly, please ensure the audio is high especially when it is such a long video and that too technical, I mean u can't be holding the mobile 2 the ear for such a video, for any video for that matter

Ответить
@raywebster7724
@raywebster7724 - 08.11.2023 15:02

Content's 'ok', but I find the delivery annoying, perhaps it's my age, but the USE of AQI (Google that with Stephen Fry), and the constant 'like' usage. Grrrr

One of the most interesting things about printf(), in term of its implementation, and now that we have the varargs macros, is in that it should return the number of characters output; yours is a void function, and as you pointed out, it's cut-down; but it's trickier than it sounds. I also think that to explain variadic functions, one should walk the format string and the stack manually, in code, i.e., . . . . imho is best explained and coded first without using stdarg. Switched away before the end, but did you explain the different calling conventions, and how they effect variadics? For example, . . . with __fastcall?

Ответить
@terrym2007
@terrym2007 - 05.11.2023 03:23

Thanks....the level was fine,,,,,,,,,☑

Ответить
@segrove
@segrove - 31.10.2023 08:30

I am self taught on C, on but very limited as a programmer, I really enjoy your deep dive into the code.

Ответить
@patrickantonio6306
@patrickantonio6306 - 30.10.2023 04:00

What a good video and Amazing series

Ответить
@StevenMartinGuitar
@StevenMartinGuitar - 29.10.2023 23:18

Really enjoying these, the length and detail are great, keep them coming!

Ответить
@michakonopka7112
@michakonopka7112 - 28.10.2023 15:31

just right!

Ответить
@gianloplo
@gianloplo - 27.10.2023 06:37

Basically implement putc, this might print to screen, uart, leds or whatever else.

Ответить
@aalawneh91
@aalawneh91 - 25.10.2023 21:53

Can’t wait for the next video

Ответить
@arivanhouten6343
@arivanhouten6343 - 23.10.2023 16:57

The printint function is really nice, tho I don't quite understand why the buffer is 16 long and not 11? From my point of view I try to think of the maximum number being inputted here which should be a signed 32-bit integer and thus 10 digits long.

Ответить
@TheOneMaddin
@TheOneMaddin - 23.10.2023 16:40

So do you say that when writing to the console, the WHOLE system (not only the process) freezes and waits for the character to be sent? This is not how I experienced writing to the console ... what do I get wrong?

Ответить
@helge000
@helge000 - 23.10.2023 10:59

This is fascinating. I guess one of the worst things you can do is print a lot of messages in kernel mode - this slows your system down to crawl (in this case 38.4kHz). I've seen this a lot; now I know why. Thank you very much!

Ответить
@MarcelRobitaille
@MarcelRobitaille - 22.10.2023 22:40

Why do they use two different methods of printing hex? %x and %p are handled differently.

Ответить
@electrolyteorb
@electrolyteorb - 21.10.2023 21:29

this helps a lot! please please please don't stop posting

Ответить
@user-do1eg2kt3v
@user-do1eg2kt3v - 21.10.2023 17:53

i believe the details are amazing, hoping for more of this series

Ответить
@llr1950
@llr1950 - 20.10.2023 16:01

Loving your recent video 👏

Ответить
@markuswerner1166
@markuswerner1166 - 19.10.2023 09:40

Great Video again. Detaillevel is correct.

Ответить
@supergamerfr
@supergamerfr - 18.10.2023 00:28

I like the fact that you are so enthusiastic about it too ! I really wish I had you as a teacher

Ответить
@jimbo1up
@jimbo1up - 17.10.2023 21:55

Brilliant! I knew something like this was going on under the hood of a kernal but to see it in the flesh is very interesting. looking forward to the rest of this series.

Ответить
@owenflaherty7516
@owenflaherty7516 - 15.10.2023 01:43

This video, in particular, has given me so much respect for the people that come up with all of this stuff, and shown me how much I take "simple" things like printf for granted

Ответить
@brayaon
@brayaon - 14.10.2023 16:48

Great video. I’ve loved this type of low-level programming since the beginning of my career and you explained concepts really well. This is an excellent complement for OS Lectures, and actually I have found your videos more useful because you show real code.

Those two algorithms for printing numbers base 10 and 16, and pointers are brilliant.

Ответить
@JamesSjaalman
@JamesSjaalman - 13.10.2023 01:11

"void main()" :: get off my yard, kiddo!

Ответить
@sekundaerzahnbuerste1675
@sekundaerzahnbuerste1675 - 12.10.2023 16:07

A source dive into the batman-adv kernel module I would find very interesting. It is a routing protocol operating on layer 2.

Ответить
@sekundaerzahnbuerste1675
@sekundaerzahnbuerste1675 - 12.10.2023 16:06

I found the detailed explanation of the printf function a bit boring. The other two episodes I liked more.

Ответить
@tear728
@tear728 - 10.10.2023 02:34

This is great! Ive been reimplementing xv6 line by line so I can learn more about operating systems. This will help me get a better understanding as well

Ответить
@gandalf1783
@gandalf1783 - 10.10.2023 01:59

Hey!
Nice one :)
Will you still explain how an OS would implement and expose glibc to its programs?

Ответить
@jeffmerlin2580
@jeffmerlin2580 - 09.10.2023 20:42

Hopefully, the va_arg function has a call to the panic function on error, like when there is more % than arguments after fmt :) Thanks for the explanation!

Ответить
@grahamrice1806
@grahamrice1806 - 09.10.2023 01:49

Cool that you went through it all. I guess you can't print %4.4x or something similar and a shame floating point isn't included - kinda weak printf. But a great educational thing for sure!

Ответить
@Arnau478
@Arnau478 - 07.10.2023 22:28

This series is sooooo good... 🔥

Ответить
@bowenliu6911
@bowenliu6911 - 06.10.2023 23:58

love this series

Ответить
@yunusaydin5177
@yunusaydin5177 - 06.10.2023 21:57

i enjoyed in every second very informative video <3

Ответить
@wiseskeshom4673
@wiseskeshom4673 - 06.10.2023 11:24

Like many forks here said, this video is really amazing and very informative and unique. I absolutely love this series. Great job man, you are my hero.

Ответить
@andreabisio
@andreabisio - 05.10.2023 19:13

Wonderful. Just the right level of details. Thank you very much

Ответить
@adriancostin9138
@adriancostin9138 - 05.10.2023 17:16

Loved this, please do more

Ответить
@tanchienhao
@tanchienhao - 05.10.2023 09:04

Awesome series, keep them coming!

Ответить
@paulmoore7964
@paulmoore7964 - 05.10.2023 03:29

you explain why 'volatile' is needed and give the example of calling that interupt off register write twice (pasting it in). in fact the code is already there that shows the need. At exit the same reg is written to reenable registers. A compiler would see x= 0, then later x = 42 (or whatever) and seeing that x is not used in between it would simply ignore the first write. BTW , excellent series, for me its slightly too slow. Gonna take about 3 months to get to a shell prompt :-). You didnt explain the boot process, ie how we get from a powered on processor to something thats running our code, you first episode starts with 'ok we have this code at 0x80000000'

Ответить
@paulmoore7964
@paulmoore7964 - 05.10.2023 02:11

suggestions - sqlite, its a lovely code base

Ответить
@Spaggei0hs
@Spaggei0hs - 04.10.2023 19:29

Absolutely love these videos, the level of detail is perfect! Makes learning about the inner workings of unix like os alot less daunting. Thank you!!

Ответить
@nerdx00
@nerdx00 - 04.10.2023 15:04

The series is a great idea and I think you're really nailing it. I think the level of detail and explanation is a great balance. I'm far from a C expert but it's enough info for me to get by with a google here and there. I only wish you were making them faster :D but I know it takes time to make high quality content. I really appreciate the decision to use risc-v and xv6.

Ответить
@rafa_br34
@rafa_br34 - 04.10.2023 02:55

Can't wait for part 4, this is becoming more and more interesting as time passes. Keep it up!

Ответить
@vdg83
@vdg83 - 04.10.2023 01:44

Thank you for the detailed explanations. Fantastic video!

Ответить