I have a switch function with many cases, like so:
0x1a => {
return .{
.label = "LD A,(DE)",
.length = 1,
.cycles = 8,
.step = ldADE,
};
},
The step functions are pretty light weight, sometimes more complex/wrapping others, but in many cases are one liners like so:
fn ldADE(cpu: *c.SM83) void {
cpu.registers.af.setHi(cpu.memory.read(cpu.registers.de.hilo()));
}
I'd love to define these in-line within the switch, so there's less indirection. Could I do that in Zig?