This reminds me of the time I was a young, naïve idiot, and decided I would learn GTK by writing some basic app in GTK. In x86 (not x86-64) assembly. Like all of my other project ideas from that era, never went anywhere, and I horribly underappreciated just how complicated things were.
Kudos for actually getting somewhere in their attempt to do this, a further state than I ever managed.
iberator 50 minutes ago [-]
I currently re-learn ASM by writing my own virtual machine with my own cpu architecture and instruction set. Its FUN :)
I never expected to write programs in pure machine code before, but here I am. Writing my own assembler now :)
Way easier than C++ LOL
I highly recommend it.
userbinator 4 hours ago [-]
This is more like "by communicating with the X server", which is not exactly the level of "from scratch" I was expecting, but then again, it's more involved than the equivalent in Win32 that's not much more than filling in some structures and invoking a few functions.
signa11 3 hours ago [-]
seesh ! what would `from scratch` mean for you ? invent the whole universe ?
userbinator 3 hours ago [-]
I was expecting something closer to direct framebuffer writes, as is often done in the various write-an-OS articles that get posted here semi-regularly.
signa11 3 hours ago [-]
i on the other hand, just loved the article.
was a bit confused about the segfault stuff mentioned towards the beginning of the article. but got quite quickly disabused of that notion with gdb etc.
farhanhubble 3 hours ago [-]
I learned X86 ASM by sinking my teeth into the Intel 8085 manual, then lighting up LEDs on a hardware emulator and later on a 8085 simulator that me and my brother built.
What certainly helped was that I had did some digital design and instruction set architecture, etc.
Later on, I did some real-world assembly programming for the PIC microcontrollers and some inlined assembly in C, which I did not find daunting at all because of my previous experience.
I guess the best prerequisite for this material is having done some low-level C, the kind where you know about text/data sections and being comfortable with calling conventions, the run time and the linking process.
Learn x86-64 assembly by writing a GUI from scratch - https://news.ycombinator.com/item?id=36153237 - June 2023 (146 comments)
Kudos for actually getting somewhere in their attempt to do this, a further state than I ever managed.
I never expected to write programs in pure machine code before, but here I am. Writing my own assembler now :)
Way easier than C++ LOL
I highly recommend it.
was a bit confused about the segfault stuff mentioned towards the beginning of the article. but got quite quickly disabused of that notion with gdb etc.
What certainly helped was that I had did some digital design and instruction set architecture, etc.
Later on, I did some real-world assembly programming for the PIC microcontrollers and some inlined assembly in C, which I did not find daunting at all because of my previous experience.
I guess the best prerequisite for this material is having done some low-level C, the kind where you know about text/data sections and being comfortable with calling conventions, the run time and the linking process.