projects
/
emu8051.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add carry flag manipulation functions
[emu8051.git]
/
src
/
cpu8051.h
diff --git
a/src/cpu8051.h
b/src/cpu8051.h
index
32ab375
..
52e710d
100644
(file)
--- a/
src/cpu8051.h
+++ b/
src/cpu8051.h
@@
-1,5
+1,5
@@
/*
/*
- *
em
u8051.h
+ *
cp
u8051.h
*
* Copyright (C) 1999 Jonathan St-André
* Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
*
* Copyright (C) 1999 Jonathan St-André
* Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
@@
-22,14
+22,18
@@
#ifndef CPU8051_H
#define CPU8051_H 1
#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_
/* Exported variables */
#undef _SCOPE_
@@
-39,59
+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
void
-
cpu8051_init( void
);
+
ShowBreakpoints(void
);
void
void
-
cpu8051_Exec( void
);
+
SetBreakpoint(unsigned int Address
);
void
void
-
cpu8051_Reset( void
);
+
ClearBreakpoint(unsigned int Address
);
void
void
-
cpu8051_WriteD( unsigned int Address, unsigned char Value
);
+
ToggleBreakpoint(unsigned int Address
);
void
void
-cpu8051_
WriteInt( unsigned int Address, unsigned char Value
);
+cpu8051_
init(void
);
void
void
-cpu8051_WriteI( unsigned int Address, unsigned char Value );
-
-unsigned char
-cpu8051_ReadD( unsigned int Address );
+cpu8051_Exec(void);
-unsigned char
-cpu8051_Re
adInt( unsigned int Address
);
+void
+cpu8051_Re
set(void
);
-unsigned char
-cpu8051_
ReadI( unsigned int Address
);
+void
+cpu8051_
WriteD(unsigned int Address, unsigned char Value
);
-unsigned int
-cpu8051_
GetNextAddress( void
);
+void
+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_Read
B( unsigned int BitAddress
);
+cpu8051_Read
D(unsigned int Address
);
-void
-cpu8051_
CheckInterrupts( void
);
+unsigned char
+cpu8051_
ReadI(unsigned int Address
);
-void
-cpu8051_
DoTimers( void
);
+unsigned char
+cpu8051_
ReadB(uint8_t bit_address
);
int
int
-cpu8051_
SFRMemInfo( unsigned int Address, char *Text
);
+cpu8051_
get_instruction_size(unsigned char opcode
);
void
void
-cpu8051_
IntMemBitInfo( unsigned int BitAddress, char *Text
);
+cpu8051_
disasm_mnemonic(unsigned char OpCode, char *buf
);
-int
-cpu8051_
Disasm( unsigned int Address, char *Text
);
+void
+cpu8051_
disasm_args(unsigned int address, char *buf
);
+int
+cpu8051_Disasm(unsigned int Address, char *Text);
#endif /* CPU8051_H */
#endif /* CPU8051_H */