-/*
- * 6502.h
- *
- * Ullrich von Bassewitz, 20.09.1998
- */
+/*****************************************************************************/
+/* */
+/* 6502.h */
+/* */
+/* 6502 specific declarations */
+/* */
+/* */
+/* */
+/* (C) 1998-2001 Ullrich von Bassewitz */
+/* Wacholderweg 14 */
+/* D-70597 Stuttgart */
+/* EMail: uz@musoftware.de */
+/* */
+/* */
+/* This software is provided 'as-is', without any expressed or implied */
+/* warranty. In no event will the authors be held liable for any damages */
+/* arising from the use of this software. */
+/* */
+/* Permission is granted to anyone to use this software for any purpose, */
+/* including commercial applications, and to alter it and redistribute it */
+/* freely, subject to the following restrictions: */
+/* */
+/* 1. The origin of this software must not be misrepresented; you must not */
+/* claim that you wrote the original software. If you use this software */
+/* in a product, an acknowledgment in the product documentation would be */
+/* appreciated but is not required. */
+/* 2. Altered source versions must be plainly marked as such, and must not */
+/* be misrepresented as being the original software. */
+/* 3. This notice may not be removed or altered from any source */
+/* distribution. */
+/* */
+/*****************************************************************************/
/* Macros for CPU instructions */
-#define BRK() __asm__ ("\tbrk")
-#define CLI() __asm__ ("\tcli")
-#define SEI() __asm__ ("\tsei")
+#define BRK() __asm__ ("brk")
+#define CLI() __asm__ ("cli")
+#define SEI() __asm__ ("sei")
};
/* Defines for the flags in the regs structure */
+#ifdef __OBSOLETE_FLAGS__
#define F_NEG 0x80 /* N flag */
#define F_OVF 0x40 /* V flag */
#define F_BRK 0x10 /* B flag */
#define F_IEN 0x04 /* I flag */
#define F_ZERO 0x02 /* Z flag */
#define F_CARRY 0x01 /* C flag */
+#endif
+
+/* Defines for the flags in the regs structure */
+#define F6502_N 0x80 /* N flag */
+#define F6502_V 0x40 /* V flag */
+#define F6502_B 0x10 /* B flag */
+#define F6502_D 0x08 /* D flag */
+#define F6502_I 0x04 /* I flag */
+#define F6502_Z 0x02 /* Z flag */
+#define F6502_C 0x01 /* C flag */
/* Function to call any machine language subroutine. All registers in the
* regs structure are passed into the routine and the results are passed
- * out. Some of the flags are ignored on input. The called routine must
- * end with an RTS.
+ * out. The B flag is ignored on input. The called routine must end with
+ * an RTS.
*/
void __fastcall__ _sys (struct regs* r);