projects
/
emu8051.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add overflow and auxiliary carry flags manipulation functions
[emu8051.git]
/
src
/
cpu8051.h
diff --git
a/src/cpu8051.h
b/src/cpu8051.h
index
67e684f
..
52e710d
100644
(file)
--- a/
src/cpu8051.h
+++ b/
src/cpu8051.h
@@
-22,12
+22,18
@@
#ifndef CPU8051_H
#define CPU8051_H 1
#ifndef CPU8051_H
#define CPU8051_H 1
-typedef struct cpu8051_t
-{
- unsigned int pc;
- unsigned long clock;
- int active_priority;
-} cpu8051_t;
+#include <stdint.h>
+
+/* 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_
/* Exported variables */
#undef _SCOPE_
@@
-37,36
+43,60
@@
typedef struct cpu8051_t
# define _SCOPE_ extern
#endif
# define _SCOPE_ extern
#endif
-_SCOPE_ cpu8051_t cpu8051;
+_SCOPE_ struct cpu8051_t cpu8051;
+
+int
+IsBreakpoint(unsigned int Address);
+
+void
+ShowBreakpoints(void);
+
+void
+SetBreakpoint(unsigned int Address);
+
+void
+ClearBreakpoint(unsigned int Address);
+
+void
+ToggleBreakpoint(unsigned int Address);
void
void
-cpu8051_init(
void
);
+cpu8051_init(
void
);
void
void
-cpu8051_Exec(
void
);
+cpu8051_Exec(
void
);
void
void
-cpu8051_Reset(
void
);
+cpu8051_Reset(
void
);
void
void
-cpu8051_WriteD(
unsigned int Address, unsigned char Value
);
+cpu8051_WriteD(
unsigned int Address, unsigned char Value
);
void
void
-cpu8051_WriteI(
unsigned int Address, unsigned char Value
);
+cpu8051_WriteI(
unsigned int Address, unsigned char Value
);
void
void
-cpu8051_WriteB(
unsigned int BitAddress, unsigned char Value
);
+cpu8051_WriteB(
uint8_t bit_address, uint8_t value
);
unsigned char
unsigned char
-cpu8051_ReadD(
unsigned int Address
);
+cpu8051_ReadD(
unsigned int Address
);
unsigned char
unsigned char
-cpu8051_ReadI(
unsigned int Address
);
+cpu8051_ReadI(
unsigned int Address
);
unsigned char
unsigned char
-cpu8051_ReadB( unsigned int BitAddress );
+cpu8051_ReadB(uint8_t bit_address);
+
+int
+cpu8051_get_instruction_size(unsigned char opcode);
+
+void
+cpu8051_disasm_mnemonic(unsigned char OpCode, char *buf);
+
+void
+cpu8051_disasm_args(unsigned int address, char *buf);
int
int
-cpu8051_Disasm(
unsigned int Address, char *Text
);
+cpu8051_Disasm(
unsigned int Address, char *Text
);
#endif /* CPU8051_H */
#endif /* CPU8051_H */