Most people think assembly is only to be used to write toy programs for learning purposes, or to write a highly optimized version of a specific function inside a codebase written in a high-level language.

Well, what if we wrote a whole program in assembly that opens a GUI window? It will be the hello world of the GUI world, but that still counts.

  • mrkite@programming.dev
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 years ago

    I think this is a good idea, at the very least to teach how x11 works, since a lot of that gets buried in libraries. I just have two concerns.

    One: I’m a little confused to why you decided to use the stack as temporary storage in the stdout pointer example as opposed to using a global .data segment. Using the stack for locals, the stack for function arguments, and basic pointers is a lot to cover all at once.

    and two: you should really give a higher level overview of x11 first. Otherwise you’re just randomly opening a socket and stuffing data into it without explaining why.