mirror of
https://github.com/mre/mos6502.git
synced 2024-06-24 09:29:37 +00:00
Add no_std flag
This commit is contained in:
parent
301c7889bb
commit
a28a92167e
|
@ -14,6 +14,9 @@ An emulator for the MOS 6502 CPU written in Rust.
|
|||
## Usage example
|
||||
|
||||
```rust
|
||||
|
||||
#![no_std]
|
||||
|
||||
extern crate mos6502;
|
||||
|
||||
use mos6502::cpu;
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#![no_std]
|
||||
|
||||
extern crate mos6502;
|
||||
|
||||
#[cfg(not(test))]
|
||||
|
@ -44,22 +46,11 @@ fn main() {
|
|||
|
||||
let zero_page_data: [u8; 17] = [
|
||||
// ZeroPage data start
|
||||
0x00,
|
||||
0x02, // ADC ZeroPage target
|
||||
0x00,
|
||||
0x04, // ADC ZeroPageX target
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x10, // ADC IndexedIndirectX address
|
||||
0x00, 0x02, // ADC ZeroPage target
|
||||
0x00, 0x04, // ADC ZeroPageX target
|
||||
0x00, 0x00, 0x00, 0x00, 0x10, // ADC IndexedIndirectX address
|
||||
0x80, // ADC IndexedIndirectX address
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x08, // ADC IndirectIndexedY address
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x08, // ADC IndirectIndexedY address
|
||||
0x80, // ADC IndirectIndexedY address
|
||||
];
|
||||
|
||||
|
@ -101,31 +92,11 @@ fn main() {
|
|||
];
|
||||
|
||||
let data: [u8; 25] = [
|
||||
0x00,
|
||||
0x09, // ADC Absolute target
|
||||
0x00,
|
||||
0x00,
|
||||
0x40, // ADC AbsoluteY 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
|
||||
0x00, 0x09, // ADC Absolute target
|
||||
0x00, 0x00, 0x40, // ADC AbsoluteY 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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user