Skip to content

Delay calculate flags #67

@fengb

Description

@fengb

It seems like in general, CPU computation flags are not used very often. It would be nice if we could restructure the code to delay flags until they're required.

New Op layout:

const daa = struct {
    fn exec(cpu: *Cpu, mmu: *Mmu, arg0: Arg, arg1: Arg) Result(1, .{4}) {}

    fn flags(val: u8, prev: u8) Flags {}
    // or
    fn flags(val: u8, prev: u8, existing: Flags) Flags {}
    // or none
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions