Tidy up some layout issues.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2019-02-03 21:13:06 +00:00
parent c4e613065b
commit 30aa1b70bf
3 changed files with 26 additions and 24 deletions

View File

@ -6,21 +6,21 @@
public enum Bits
{
Bit0 = 1,
Bit1 = Bit0 << 1,
Bit2 = Bit1 << 1,
Bit3 = Bit2 << 1,
Bit4 = Bit3 << 1,
Bit5 = Bit4 << 1,
Bit6 = Bit5 << 1,
Bit7 = Bit6 << 1,
Bit8 = Bit7 << 1,
Bit9 = Bit8 << 1,
Bit10 = Bit9 << 1,
Bit11 = Bit10 << 1,
Bit12 = Bit11 << 1,
Bit13 = Bit12 << 1,
Bit14 = Bit13 << 1,
Bit15 = Bit14 << 1,
Bit16 = Bit15 << 1
Bit1 = Bit0 << 1,
Bit2 = Bit1 << 1,
Bit3 = Bit2 << 1,
Bit4 = Bit3 << 1,
Bit5 = Bit4 << 1,
Bit6 = Bit5 << 1,
Bit7 = Bit6 << 1,
Bit8 = Bit7 << 1,
Bit9 = Bit8 << 1,
Bit10 = Bit9 << 1,
Bit11 = Bit10 << 1,
Bit12 = Bit11 << 1,
Bit13 = Bit12 << 1,
Bit14 = Bit13 << 1,
Bit15 = Bit14 << 1,
Bit16 = Bit15 << 1
}
}

View File

@ -10,12 +10,13 @@
public IntelOpCodeDecoded() { }
public IntelOpCodeDecoded(byte opcode) {
public IntelOpCodeDecoded(byte opcode)
{
x = (opcode & 0b11000000) >> 6; // 0 - 3
y = (opcode & 0b00111000) >> 3; // 0 - 7
z = (opcode & 0b00000111); // 0 - 7
p = (y & 0b110) >> 1; // 0 - 3
q = (y & 1); // 0 - 1
}
y = (opcode & 0b00111000) >> 3; // 0 - 7
z = (opcode & 0b00000111); // 0 - 7
p = (y & 0b110) >> 1; // 0 - 3
q = (y & 1); // 0 - 1
}
}
}

View File

@ -7,8 +7,9 @@
{
}
public override sealed ref byte Reference(ushort address) {
return ref Bytes()[address];
public override sealed ref byte Reference(ushort address)
{
return ref Bytes()[address];
}
public new void Poke(ushort address, byte value)