Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instruction set for processor #2

Open
saku-koodari opened this issue Aug 21, 2016 · 8 comments
Open

Instruction set for processor #2

saku-koodari opened this issue Aug 21, 2016 · 8 comments
Assignees

Comments

@saku-koodari
Copy link
Owner

I haven't decided how to implement this. Memory have to design before this.

@saku-koodari saku-koodari self-assigned this Aug 21, 2016
saku-koodari pushed a commit that referenced this issue Aug 25, 2016
@saku-koodari saku-koodari mentioned this issue Aug 30, 2016
@saku-koodari
Copy link
Owner Author

saku-koodari commented Aug 30, 2016

This issue is highly related with #32 and it's sub-tasks:
#36 (Closed)
#37 (Closed)
#38 (Closed)
I might design those things here as well.

@saku-koodari
Copy link
Owner Author

Instructions is so big thing that it would be better to split it into namespace.
There you can make class Instruction which could look like

public class Instruction
{
    public string InstructionMnemonic { get; set; }
    public int LengthInBytes { get; set; }
    public int DurationInCycles { get; set; }
    public Flag[] FlagsAffected { get; set; }
}

Then you create array of Instruction, where an instruction object stores a opcode

@saku-koodari
Copy link
Owner Author

I don't think we need that complex system, maybe...
After all opcodes are just word that is easier to read than plain binary

@saku-koodari
Copy link
Owner Author

saku-koodari commented Sep 1, 2016

actually I still want to use an own class. Then you can save an extra data you might need.

Other thing is that, instead of you use Flags[](yes, I mistype it earlier), it could be type of byte

public byte FlagsAffected { get; set; }

Then you can set it like this for example:

var ins = new Instrction { FlagsAffected = Flags.C | Flags.N };

all flags combined is 0xF0, so its enough smalla for byte

@saku-koodari
Copy link
Owner Author

saku-koodari commented Sep 1, 2016

Instruction set is becoming so big, that it's better to write dll for that, maybe.
I'll forgot that for now. It speed is the issue, then i'll split into dll.

@saku-koodari
Copy link
Owner Author

@saku-koodari
Copy link
Owner Author

Maybe operand could be an enum?

@saku-koodari
Copy link
Owner Author

saku-koodari commented Sep 6, 2016

So, before I'll write rest of instructions, I'll do GUI. I don't want to waste a time writing a full instruction set and later see that I need some redesigning. I'll start #22: GUI, before I continue with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant