mirror of
https://github.com/mre/mos6502.git
synced 2024-12-23 03:29:51 +00:00
compiler fixes, static -> const
This commit is contained in:
parent
a8b8fa12d4
commit
34cd5edd44
@ -36,17 +36,17 @@ use address::{Address, AddressDiff};
|
||||
// end: Address,
|
||||
// }
|
||||
|
||||
static ADDR_LO_BARE: u16 = 0x0000;
|
||||
static ADDR_HI_BARE: u16 = 0xFFFF;
|
||||
const ADDR_LO_BARE: u16 = 0x0000;
|
||||
const ADDR_HI_BARE: u16 = 0xFFFF;
|
||||
|
||||
pub static MEMORY_ADDRESS_LO: Address = Address(ADDR_LO_BARE);
|
||||
pub static MEMORY_ADDRESS_HI: Address = Address(ADDR_HI_BARE);
|
||||
pub static STACK_ADDRESS_LO: Address = Address(0x0100);
|
||||
pub static STACK_ADDRESS_HI: Address = Address(0x01FF);
|
||||
pub static IRQ_INTERRUPT_VECTOR_LO: Address = Address(0xFFFE);
|
||||
pub static IRQ_INTERRUPT_VECTOR_HI: Address = Address(0xFFFF);
|
||||
pub const MEMORY_ADDRESS_LO: Address = Address(ADDR_LO_BARE);
|
||||
pub const MEMORY_ADDRESS_HI: Address = Address(ADDR_HI_BARE);
|
||||
pub const STACK_ADDRESS_LO: Address = Address(0x0100);
|
||||
pub const STACK_ADDRESS_HI: Address = Address(0x01FF);
|
||||
pub const IRQ_INTERRUPT_VECTOR_LO: Address = Address(0xFFFE);
|
||||
pub const IRQ_INTERRUPT_VECTOR_HI: Address = Address(0xFFFF);
|
||||
|
||||
static MEMORY_SIZE: uint = (ADDR_HI_BARE - ADDR_LO_BARE) as uint + 1u;
|
||||
const MEMORY_SIZE: uint = (ADDR_HI_BARE - ADDR_LO_BARE) as uint + 1u;
|
||||
|
||||
pub struct Memory {
|
||||
bytes: [u8, ..MEMORY_SIZE]
|
||||
|
@ -55,14 +55,14 @@ impl StatusArgs {
|
||||
|
||||
pub bitflags! {
|
||||
flags Status: u8 {
|
||||
static PS_NEGATIVE = 0b10000000,
|
||||
static PS_OVERFLOW = 0b01000000,
|
||||
static PS_UNUSED = 0b00100000, // JAM: Should this exist?
|
||||
static PS_BRK = 0b00010000,
|
||||
static PS_DECIMAL_MODE = 0b00001000,
|
||||
static PS_DISABLE_INTERRUPTS = 0b00000100,
|
||||
static PS_ZERO = 0b00000010,
|
||||
static PS_CARRY = 0b00000001,
|
||||
const PS_NEGATIVE = 0b10000000,
|
||||
const PS_OVERFLOW = 0b01000000,
|
||||
const PS_UNUSED = 0b00100000, // JAM: Should this exist?
|
||||
const PS_BRK = 0b00010000,
|
||||
const PS_DECIMAL_MODE = 0b00001000,
|
||||
const PS_DISABLE_INTERRUPTS = 0b00000100,
|
||||
const PS_ZERO = 0b00000010,
|
||||
const PS_CARRY = 0b00000001,
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user