home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
405.lha
/
AppleII_Emulators_src
/
src-2
/
cpu_flags.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-06-28
|
935b
|
59 lines
#include <cpu_prog_model.h>
#include <cpu6502_addrm.h>
#define FALSE 0
#define TRUE 1
#define Process_status( code) \
code->Ne << 6 | code->Ov << 5 | code->Br << 4 | \
code->De << 3 | code->In << 2 | code->Ze << 1 | \
code->Ca
void reg_dump( code)
PM *code;
{
printf(" A=%02x X=%02x Y=%02x P=%02x S=%02x\n", code->Ac,
code->Xr,
code->Yr,
Process_status(code),
code->SP );
}
void CLC( code)
PM *code;
{
code->Ca = FALSE;
}
void CLD( code)
PM *code;
{
code->De = FALSE;
}
void CLI( code)
PM *code;
{
code->In = FALSE;
}
void CLV( code)
PM *code;
{
code->Ov = FALSE;
}
void SEC( code)
PM *code;
{
code->Ca = TRUE;
}
void SEI( code)
PM *code;
{
code->In = TRUE;
}