1
0
mirror of https://github.com/mre/mos6502.git synced 2024-09-27 19:56:34 +00:00

Integrate AddressingMode.

This commit is contained in:
Andrew Keeton 2014-09-28 21:07:13 -04:00
parent 203bfa6244
commit 53fce602b3

View File

@ -31,6 +31,22 @@ pub struct Address(pub u16);
#[deriving(PartialEq, Eq, PartialOrd, Ord)]
pub struct AddressDiff(pub u16);
pub enum AddressingMode {
Immediate,
Absolute,
ZeroPage,
Implied,
IndirectAbsolute,
AbsoluteIndexedX,
AbsoluteIndexedY,
ZeroPageIndexedX,
ZeroageIndexedY,
IndexedIndirect,
IndirectIndexed,
Relative,
Accumulator
}
// The idea here is that it doesn't make sense to add two addresses, but it
// does make sense to add an address and an "address-difference". (If this
// is too annoying to work with we should let it go.)