C without lib C – nostdlib-C (X86_64) – Part 1



Flexing in C without lib C. Writing hello world to stdout without any libraries.

0:00 G’day
1:02 Simple C project
4:12 No stdlib
6:05 Our own _start
8:22 Our own write function
12:11 Syscall vs C function call
13:03 Our own syscall
15:22 compiler_flags.txt
16:09 See ya!

* Code

#assembler
#c
#programming
#x86

source

37 Comments

  1. Tsoding used free standing C to be able to compile directly to web assembly, without emscripten. I tried this and I was able to render a pixels using C directly to the html canvas without javascript, just used it for instantiate the web assembly binary. Great video, definitely an interesting topic.

  2. Hello! GREAT video! I would like to ask you, instead of creating the start.s Assebly file, which is linked during compilation with the main.c C file, could you pass the Assembly instructions in the main.c file, using inline Assembly (like '__asm__' …), since the C language supports inline Assembly code? That would be an extremely interesting variation! 😀

  3. Been there, done that. SCO Unix had a completely broken lib3c, and any serious program could only rely on lib2. Also, malloc/free was broken, so programs can only use statically allocated arrays and such. Or manually call sbrk(), which seemed to work.

  4. Great video, I just have a question, where did you learn all of these ASM stuff, I am trying to learn, but I am not really find a good way/resource which I have found enjoyable.

  5. i made a 1k intro a little bit ago! i made it in c with a bunch of inline asm; it used direct system calls to put some pretty patterns on /dev/fb0 and didn't link against a single library 😛

  6. when i see someone

    use a fancy shell prompt, create makefile, use .phony … before starting writing code.

    i remember myself when i started using it, i think it's cool.

    old professional dev, not use this fancy thing as much as possible. so this channel for beginners not me even the title was do good.

  7. It will be very good if you do it for embedded systems like arduino because they have limited resources and we learn it by seeing it on actul hardware and what we can achive and save , for best practice and complexty you may program esp32 using arduino platform , good video

  8. This is very cool. Can you show how to implement the sine function? I want to dip my toes into retro console development so this video series might come in handy.

  9. I just wanted to say thank you… I need a series like this as I'm preparing to set out to develop a New C Runtime for a project I'm working on that will bring modern features to C but I must first discard the standard runtime libraries, 60 years of standards body slop… I just stumbled across this and I'm following you now… I really like what I'm seeing on your channel it's quite relevant to the stuff that I'm working on. Again thank you.

  10. Maybe you already know this but since you have a Makefile and use clangd you could also install bear and run the following to generate a compile_commands.json based on the makefile “make clean; bear — make” versus using compile_flags.txt

Leave a Reply

Your email address will not be published. Required fields are marked *

You might like

© 2026 Cantinho do Vídeo - WordPress Video Theme by WPEnjoy