1
0
mirror of https://github.com/jborza/emu6502.git synced 2024-06-08 07:29:32 +00:00
emu6502/flags.h
2019-04-13 10:28:57 +02:00

15 lines
622 B
C

#pragma once
//#include <cstdint>
#include "types.h"
typedef struct Flags {
//flags high to low: NV-BDIZC
uint8_t c : 1; //set if last operation caused an overflow from bit 7 of the result or an underflow from bit 0
uint8_t z : 1; //set if the result of the last operation was zero
uint8_t i : 1; //set with SEI and cleared with CLI
uint8_t d : 1; //set with SEC and cleared with CLD
uint8_t b : 1; //set when BRK executed
uint8_t pad : 1; //not used
uint8_t v : 1; //if the result has yielded an invalid two's complement result
uint8_t n : 1; //set if the result of the last operation set bit 7 to one
} Flags;