1 |
|
/* |
2 |
< |
* mon.h - Machine language monitor |
2 |
> |
* mon.h - mon main program |
3 |
|
* |
4 |
< |
* (C) 1997-1999 Christian Bauer |
4 |
> |
* mon (C) 1997-1999 Christian Bauer, Marc Hellwig |
5 |
> |
* |
6 |
> |
* This program is free software; you can redistribute it and/or modify |
7 |
> |
* it under the terms of the GNU General Public License as published by |
8 |
> |
* the Free Software Foundation; either version 2 of the License, or |
9 |
> |
* (at your option) any later version. |
10 |
> |
* |
11 |
> |
* This program is distributed in the hope that it will be useful, |
12 |
> |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
> |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 |
> |
* GNU General Public License for more details. |
15 |
> |
* |
16 |
> |
* You should have received a copy of the GNU General Public License |
17 |
> |
* along with this program; if not, write to the Free Software |
18 |
> |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 |
|
*/ |
20 |
|
|
21 |
< |
#ifndef _MON_H_ |
22 |
< |
#define _MON_H_ |
21 |
> |
#ifndef MON_H |
22 |
> |
#define MON_H |
23 |
|
|
24 |
+ |
#include <stdio.h> |
25 |
|
|
11 |
– |
// Version/revision |
12 |
– |
const int MON_VERSION = 2; |
13 |
– |
const int MON_REVISION = 2; |
26 |
|
|
27 |
+ |
/* |
28 |
+ |
* Version information |
29 |
+ |
*/ |
30 |
|
|
31 |
< |
// Data types |
32 |
< |
#if __BEOS__ |
18 |
< |
#include <SupportDefs.h> |
19 |
< |
#else |
20 |
< |
typedef signed char int8; |
21 |
< |
typedef unsigned char uint8; |
22 |
< |
typedef signed short int16; |
23 |
< |
typedef unsigned short uint16; |
24 |
< |
typedef signed long int32; |
25 |
< |
typedef unsigned long uint32; |
26 |
< |
#endif |
31 |
> |
const int MON_VERSION_MAJOR = 2; |
32 |
> |
const int MON_VERSION_MINOR = 2; |
33 |
|
|
34 |
|
|
35 |
< |
// Initialization, deinitialization and invocation |
35 |
> |
/* |
36 |
> |
* Initialization, deinitialization and invocation |
37 |
> |
*/ |
38 |
> |
|
39 |
|
void mon_init(void); |
40 |
|
void mon_exit(void); |
41 |
|
void mon(int argc, char **argv); |
97 |
|
extern enum Token mon_get_token(void); // Get next token |
98 |
|
extern bool mon_expression(uint32 *number); // Parse expression |
99 |
|
extern bool mon_aborted(void); // Check if Ctrl-C was pressed |
100 |
< |
extern uint32 mon_read_byte(uint32 adr); // Memory access |
101 |
< |
extern void mon_write_byte(uint32 adr, uint32 b); |
100 |
> |
|
101 |
> |
// Memory access |
102 |
> |
extern uint32 (*mon_read_byte)(uint32 adr); |
103 |
> |
extern void (*mon_write_byte)(uint32 adr, uint32 b); |
104 |
|
extern uint32 mon_read_half(uint32 adr); |
105 |
|
extern void mon_write_half(uint32 adr, uint32 w); |
106 |
|
extern uint32 mon_read_word(uint32 adr); |