You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
686 B
28 lines
686 B
#pragma once
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
uint8_t memory[0xFFFF + 1]; //16kib memory (probably)
|
|
//0x0000 - 0x00FF is Zero Paged
|
|
//0x0100 - 0x01FF is system stack
|
|
|
|
uint16_t prc = 0; //16bit program counter
|
|
|
|
uint8_t spt = 0; //8bit stack pointer
|
|
|
|
uint8_t acc = 0; //8bit accumulator
|
|
uint8_t irx,iry = 0; //2 8bit index registers
|
|
|
|
struct status {
|
|
bool carry; //carry flag
|
|
bool zero; //zero flag
|
|
bool ird; //interrupt disable flag
|
|
bool dec; //decimal mode flag for arithmetic
|
|
bool brk; //break bit
|
|
bool overflow; //overflow flag
|
|
bool neg; //negative flag
|
|
};
|
|
|
|
|
|
struct status cpuStatus;
|