home *** CD-ROM | disk | FTP | other *** search
- #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;
- }
-
-