]> git.sur5r.net Git - cc65/blobdiff - include/6502.h
Fixed irq handler return value.
[cc65] / include / 6502.h
index 99641b21e137d1f22233cdd36c8f1b38f305e508..8aa124ce537a7163337025c7d610320f21006c47 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998-2001 Ullrich von Bassewitz                                       */
-/*               Wacholderweg 14                                             */
-/*               D-70597 Stuttgart                                           */
-/* EMail:        uz@musoftware.de                                            */
+/* (C) 1998-2012, Ullrich von Bassewitz                                      */
+/*                Roemerstrasse 52                                           */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
@@ -64,17 +64,6 @@ struct regs {
     unsigned      pc;          /* Program counter */
 };
 
-/* 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_DEC          0x08    /* D 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 */
@@ -111,15 +100,27 @@ typedef void (*brk_handler) (void);
 /* Type of the break handler */
 
 void __fastcall__ set_brk (brk_handler f);
-/* Set the break vector to the given address, return the old address */
+/* Set the break vector to the given address */
 
 void reset_brk (void);
 /* Reset the break vector to the original value */
 
 
 
-/* End of 6502.h */
-#endif
+/* Possible returns for irq_handler() */
+#define IRQ_NOT_HANDLED        0
+#define IRQ_HANDLED    1
 
+typedef unsigned char (*irq_handler) (void);
+/* Type of the C level interrupt request handler */
 
+void __fastcall__ set_irq (irq_handler f, void *stack_addr, size_t stack_size);
+/* Set the C level interrupt request vector to the given address */
 
+void reset_irq (void);
+/* Reset the C level interrupt request vector */
+
+
+
+/* End of 6502.h */
+#endif