mirror of
https://github.com/mre/mos6502.git
synced 2025-02-22 23:29:01 +00:00
Statically initialize CPU
This commit is contained in:
parent
a4990eacbc
commit
ad90d9294c
@ -12,6 +12,11 @@ cortex-m-semihosting = "0.3.1"
|
|||||||
panic-halt = "0.2.0"
|
panic-halt = "0.2.0"
|
||||||
mos6502 = { path = ".." }
|
mos6502 = { path = ".." }
|
||||||
|
|
||||||
|
[dependencies.once_cell]
|
||||||
|
version = "1.5.2"
|
||||||
|
default-features = false
|
||||||
|
features = []
|
||||||
|
|
||||||
# Uncomment for the panic example.
|
# Uncomment for the panic example.
|
||||||
# panic-itm = "0.4.0"
|
# panic-itm = "0.4.0"
|
||||||
|
|
||||||
|
@ -10,11 +10,13 @@ use cortex_m_rt::entry;
|
|||||||
use mos6502::address::Address;
|
use mos6502::address::Address;
|
||||||
use mos6502::cpu;
|
use mos6502::cpu;
|
||||||
|
|
||||||
|
use once_cell::unsync::Lazy;
|
||||||
|
|
||||||
#[entry]
|
#[entry]
|
||||||
fn main() -> ! {
|
fn main() -> ! {
|
||||||
loop {
|
let mut cpu = Lazy::new(|| cpu::CPU::new());
|
||||||
let mut cpu = cpu::CPU::new();
|
|
||||||
|
|
||||||
|
loop {
|
||||||
let zero_page_data = [
|
let zero_page_data = [
|
||||||
// ZeroPage data start
|
// ZeroPage data start
|
||||||
0x00, 0x02, // ADC ZeroPage target
|
0x00, 0x02, // ADC ZeroPage target
|
||||||
|
Loading…
x
Reference in New Issue
Block a user