Fix bug with children not resizing with main window
[emu8051.git] / src / cpu8051.h
index 1ea4289..f11122a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * emu8051.h
+ * cpu8051.h
  *
  * Copyright (C) 1999 Jonathan St-AndrĂ©
  * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
  *
  * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
 #ifndef CPU8051_H
 #define CPU8051_H 1
 
+#include <stdint.h>
 
-typedef struct cpu8051_t
-{
-  unsigned int pc;
-  unsigned long clock;
-  int active_priority;
-} cpu8051_t;
+/* Maximum number of BreakPoints */
+#define MAXBP 32
 
+struct cpu8051_t {
+       unsigned int pc; /* Program counter */
+       unsigned long clock;
+       int active_priority;
+       int bp_count;
+       unsigned int bp[MAXBP]; /* List of breakpoints */
+};
 
 /* Exported variables */
 #undef _SCOPE_
@@ -39,59 +43,51 @@ typedef struct cpu8051_t
 #  define _SCOPE_ extern
 #endif
 
-_SCOPE_ cpu8051_t cpu8051;
+_SCOPE_ struct cpu8051_t cpu8051;
 
+int
+IsBreakpoint(unsigned int Address);
 
 void
-cpu8051_init( void );
+ShowBreakpoints(void);
 
 void
-cpu8051_Exec( void );
+SetBreakpoint(unsigned int Address);
 
 void
-cpu8051_Reset( void );
+ClearBreakpoint(unsigned int Address);
 
 void
-cpu8051_WriteD( unsigned int Address, unsigned char Value );
+ToggleBreakpoint(unsigned int Address);
 
 void
-cpu8051_WriteInt( unsigned int Address, unsigned char Value );
+cpu8051_init(void);
 
 void
-cpu8051_WriteI( unsigned int Address, unsigned char Value );
-
-unsigned char
-cpu8051_ReadD( unsigned int Address );
-
-unsigned char
-cpu8051_ReadInt( unsigned int Address );
-
-unsigned char
-cpu8051_ReadI( unsigned int Address );
-
-unsigned int
-cpu8051_GetNextAddress( void );
+cpu8051_Exec(void);
 
 void
-cpu8051_WriteB( unsigned int BitAddress, unsigned char Value );
+cpu8051_Reset(void);
 
-unsigned char
-cpu8051_ReadB( unsigned int BitAddress );
+void
+cpu8051_WriteD(unsigned int Address, unsigned char Value);
 
 void
-cpu8051_CheckInterrupts( void );
+cpu8051_WriteI(unsigned int Address, unsigned char Value);
 
 void
-cpu8051_DoTimers( void );
+cpu8051_WriteB(uint8_t bit_address, uint8_t value);
 
-int
-cpu8051_SFRMemInfo( unsigned int Address, char *Text );
+unsigned char
+cpu8051_ReadD(unsigned int Address);
 
-void
-cpu8051_IntMemBitInfo( unsigned int BitAddress, char *Text );
+unsigned char
+cpu8051_ReadI(unsigned int Address);
 
-int
-cpu8051_Disasm( unsigned int Address, char *Text );
+unsigned char
+cpu8051_ReadB(uint8_t bit_address);
 
+int
+cpu8051_Disasm(unsigned int Address, char *Text);
 
 #endif /* CPU8051_H */