mirror of https://github.com/mre/mos6502.git
Format code
This commit is contained in:
parent
e829122a5a
commit
363dc47755
|
@ -65,3 +65,4 @@ TAGS.vi
|
||||||
\#*\#
|
\#*\#
|
||||||
src/.DS_Store
|
src/.DS_Store
|
||||||
tmp.*.rs
|
tmp.*.rs
|
||||||
|
.vscode
|
||||||
|
|
|
@ -26,8 +26,7 @@ fn main() {
|
||||||
0x4c, 0x12, 0x00, // Jump to .algo_
|
0x4c, 0x12, 0x00, // Jump to .algo_
|
||||||
// .end
|
// .end
|
||||||
0xa5, 0x00, // Load from S to A
|
0xa5, 0x00, // Load from S to A
|
||||||
0xff,
|
0xff, // .swap
|
||||||
// .swap
|
|
||||||
0xa6, 0x00, // load F to X
|
0xa6, 0x00, // load F to X
|
||||||
0xa4, 0x01, // load S to Y
|
0xa4, 0x01, // load S to Y
|
||||||
0x86, 0x01, // Store X to F
|
0x86, 0x01, // Store X to F
|
||||||
|
|
|
@ -39,25 +39,13 @@ fn main() {
|
||||||
|
|
||||||
// "Load" a program
|
// "Load" a program
|
||||||
|
|
||||||
|
|
||||||
let zero_page_data = [
|
let zero_page_data = [
|
||||||
// ZeroPage data start
|
// ZeroPage data start
|
||||||
0x00,
|
0x00, 0x02, // ADC ZeroPage target
|
||||||
0x02, // ADC ZeroPage target
|
0x00, 0x04, // ADC ZeroPageX target
|
||||||
0x00,
|
0x00, 0x00, 0x00, 0x00, 0x10, // ADC IndexedIndirectX address
|
||||||
0x04, // ADC ZeroPageX target
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x10, // ADC IndexedIndirectX address
|
|
||||||
0x80, // ADC IndexedIndirectX address
|
0x80, // ADC IndexedIndirectX address
|
||||||
0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x08, // ADC IndirectIndexedY address
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x08, // ADC IndirectIndexedY address
|
|
||||||
0x80, // ADC IndirectIndexedY address
|
0x80, // ADC IndirectIndexedY address
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -99,31 +87,11 @@ fn main() {
|
||||||
];
|
];
|
||||||
|
|
||||||
let data = [
|
let data = [
|
||||||
0x00,
|
0x00, 0x09, // ADC Absolute target
|
||||||
0x09, // ADC Absolute target
|
0x00, 0x00, 0x40, // ADC AbsoluteY target
|
||||||
0x00,
|
0x00, 0x00, 0x00, 0x11, // ADC AbsoluteX target
|
||||||
0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, // ADC IndexedIndirectX target
|
||||||
0x40, // ADC AbsoluteY target
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, // ADC IndirectIndexedY target
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x11, // ADC AbsoluteX target
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x12, // ADC IndexedIndirectX target
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x06, // ADC IndirectIndexedY target
|
|
||||||
];
|
];
|
||||||
|
|
||||||
cpu.memory.set_bytes(Address(0x0000), &zero_page_data);
|
cpu.memory.set_bytes(Address(0x0000), &zero_page_data);
|
||||||
|
|
|
@ -40,4 +40,3 @@ pub mod cpu;
|
||||||
pub mod instruction;
|
pub mod instruction;
|
||||||
pub mod memory;
|
pub mod memory;
|
||||||
pub mod registers;
|
pub mod registers;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue