Today you build the CPU's register file, the eight one-byte slots that hold every value the processor works with. Every instruction you write for the rest of the project reads from and writes to these registers, so getting the container right first makes everything after it trivial.
Build a register file that stores and returns a single byte in any of the CPU's eight registers.
The heart of the Game Boy is the Sharp LR35902, an 8-bit CPU. Everything it
does flows through eight one-byte registers named A, B, C, D, E,
F, H, and L. A is the accumulator - most arithmetic lands there -
and F holds status flags we will meet on lesson 5. The rest are general
scratch space.
A register is just a byte of storage: you write a value in and read the same value back. Start here because every instruction you write for the rest of the project will move data into and out of these eight slots. Getting the container right first makes all of that trivial.
// eight 8-bit registers, all starting at zerotype Registers struct {A, B, C, D, E, F, H, L uint8}r := &Registers{}r.A = 0x12
The DMG CPU has eight 8-bit registers. Any "Game Boy CPU manual" register summary covers them.