Tag Archives: programming

A simple host system for a 6502 emulator

2000px-CBM_Logo.svgCPU emulation, particularly of older processors, is an interesting topic.

While emulation source code for various CPU cores is easily available, I wanted to better understand how to interface the emulated CPU with my host machine. Therefore I decided to write a simple example of a host system for an emulated MOS Technology 6502 microprocessor.

The goal would be to have the emulated 6502 write “Hello, world” to the console of my linux desktop machine.

Continue reading A simple host system for a 6502 emulator

gdb, inline source, and stepping through your code

I really like having inline source when using gdb. Code Complete, by Steve Mcconnell has an entire chapter explaining how you should proactively step through all code you write — and not just when you’re actively debugging an issue. Having followed this practice for a few years now, I can testify that it increases your productivity enormously. I simply can’t imagine not doing so before committing any code.

Continue reading gdb, inline source, and stepping through your code