struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / debugger / mcs51 / simi.h
blob0de2145a90a93e3ec195f67c0b89de90c19e3acc
1 /*-------------------------------------------------------------------------
2 simi.h - Header file for simulator interaction
3 Written By - Sandeep Dutta . sandeep.dutta@usa.net (1999)
5 This program is free software; you can redistribute it and/or modify it
6 under the terms of the GNU General Public License as published by the
7 Free Software Foundation; either version 2, or (at your option) any
8 later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 In other words, you are welcome to use, share and improve this program.
20 You are forbidden to forbid anyone else to use, share and improve
21 what you give them. Help stamp out software-hoarding!
22 -------------------------------------------------------------------------*/
24 #ifndef SIMI_H
25 #define SIMI_H
27 #ifdef _WIN32
28 /* ugly hack to prevent the incusion of objidl.h */
29 #ifdef __MINGW32__
30 #define _OLE2_H
31 #elif defined _MSC_VER
32 #define _WINSOCK_DEPRECATED_NO_WARNINGS
33 #define _OLE2_H_
34 #endif
35 #include <winsock2.h>
36 #endif
38 #define MAX_SIM_BUFF 8*1024
40 #define MAX_CACHE_SIZE 2048
41 /* number of cache */
42 #define IMEM_CACHE 0
43 #define XMEM_CACHE 1
44 #define SREG_CACHE 2
45 #define NMEM_CACHE 3
46 /* special index */
47 #define BIT_CACHE 4
49 typedef struct _memcache
51 unsigned int addr;
52 unsigned int size;
53 char buffer[MAX_CACHE_SIZE];
54 } memcache_t;
56 //#define SIMNAME "s51"
57 #ifdef _WIN32
58 extern SOCKET sock;
59 #else
60 extern int sock;
61 #endif
62 extern char simactive;
63 void openSimulator (char **,int);
64 void waitForSim(int timeout_ms, char *expect);
65 void closeSimulator ();
66 void sendSim(char *);
67 char *simResponse();
68 void simSetPC (unsigned int);
69 void simSetBP (unsigned int);
70 void simClearBP (unsigned int);
71 void simLoadFile(char *);
72 void simReset ();
73 char *simRegs() ;
74 unsigned int simGoTillBp (unsigned int);
75 unsigned long simGetValue (unsigned int ,char , unsigned int );
76 int simSetValue (unsigned int ,char , unsigned int, unsigned long );
77 #endif