Setting up an x86 CPU in 64-bit mode
Related
More from thasso.xyz
It’s well-known that null-terminated C strings are bug-prone and unsafe to use. They’re the stereotypical footgun. I’ve been tinkering in a bare-metal environment recently, writing all code myself, including the common types and routines you find in libc or similar. In all the code I wrote, there is not at single null-terminated string, and I...
I’ve been upset with my output lately. Just overall. For a few months, I felt I did a good (at least decent) job posting inspired content on this site. I was also learning steadily and making good progress on my programming. But in recent months, less so. I tried to focus on specific projects, but I couldn’t stick to any of them for long. As...
Parsing numerical expressions by recursive descent is a joy in Haskell! It is incredibly concise and elegant, yet very simple. What we want to parse are binary expressions like 7 + 42 * 9, 2 * 3 / 4 * 5, or 8 * (10 - 6). As always, when parsing such expressions, we have to be aware of the associativity of the operators involved and of their...
Recently, I’ve been working on a C debugger. This requires reading and processing the DWARF debugging information that’s part of the binary. Since this is a rather complex task, I figured I might use a library that exports a nice interface to the debugging information. One such library that I found early on was libelfin. It wasn’t perfect from...