1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-11-27 20:51:17 +00:00
erc-c/src/mos6502.stat.c

42 lines
394 B
C
Raw Normal View History

2017-12-02 19:05:53 +00:00
/*
* mos6502.stat.c
*/
#include "mos6502.h"
#include "mos6502.enums.h"
DEFINE_INST(clc)
{
cpu->P &= ~CARRY;
}
DEFINE_INST(cld)
{
cpu->P &= ~DECIMAL;
}
DEFINE_INST(cli)
{
cpu->P &= ~INTERRUPT;
}
DEFINE_INST(clv)
{
cpu->P &= ~OVERFLOW;
}
DEFINE_INST(sec)
{
cpu->P |= CARRY;
}
DEFINE_INST(sed)
{
cpu->P |= DECIMAL;
}
DEFINE_INST(sei)
{
cpu->P |= INTERRUPT;
}