Change scope of local variable to static
[emu8051.git] / src / reg8051.h
index 693b788..b484246 100644 (file)
@@ -1,10 +1,27 @@
-/* reg8051.h */
-
+/*
+ * reg8051.h
+ *
+ * Copyright (C) 1999 Jonathan St-AndrĂ©
+ * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
 
 #ifndef REG8051_H
 #define REG8051_H 1
 
-
 /* SFR Registers ( $80 - $FF ) */
 #define _ACC_       0xE0
 #define _B_         0xF0
 #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 */