mirror of
https://github.com/pevans/erc-c.git
synced 2024-11-27 20:51:17 +00:00
42 lines
394 B
C
42 lines
394 B
C
|
/*
|
||
|
* 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;
|
||
|
}
|