X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=src%2Freg8051.h;h=b48424618428e464a56202b6c7f74e4984ca2937;hb=82819ebb72819f4a39c5a9aa95fbb2cef22d510f;hp=9fc3e489e8dd27171a0b102fd7f8408560924958;hpb=fc4dd8fa3aab94a5f63c097ed9809c75560abd7d;p=emu8051.git diff --git a/src/reg8051.h b/src/reg8051.h index 9fc3e48..b484246 100644 --- a/src/reg8051.h +++ b/src/reg8051.h @@ -22,7 +22,6 @@ #ifndef REG8051_H #define REG8051_H 1 - /* SFR Registers ( $80 - $FF ) */ #define _ACC_ 0xE0 #define _B_ 0xF0 @@ -63,5 +62,14 @@ #define _BANK2_ 0x10 #define _BANK3_ 0x18 +#define PSW_BIT_CY 7 +#define PSW_BIT_AC 6 +#define PSW_BIT_OV 2 +#define PSW_BIT_P 0 + +#define PSW_FLAG_CY (1 << PSW_BIT_CY) +#define PSW_FLAG_AC (1 << PSW_BIT_AC) +#define PSW_FLAG_OV (1 << PSW_BIT_OV) +#define PSW_FLAG_P (1 << PSW_BIT_P) #endif /* REG8051_H */