First Commit of my working state
[simh.git] / sim_defs.h
1
2 /* sim_defs.h: simulator definitions
3
4 Copyright (c) 1993-2008, Robert M Supnik
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 ROBERT M SUPNIK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
23 Except as contained in this notice, the name of Robert M Supnik shall not be
24 used in advertising or otherwise to promote the sale, use or other dealings
25 in this Software without prior written authorization from Robert M Supnik.
26
27 28-May-08 RMS Added inlining support
28 28-Jun-07 RMS Added IA64 VMS support (from Norm Lastovica)
29 18-Jun-07 RMS Added UNIT_IDLE flag
30 18-Mar-07 RMS Added UNIT_TEXT flag
31 07-Mar-07 JDB Added DEBUG_PRJ macro
32 18-Oct-06 RMS Added limit check for clock synchronized keyboard waits
33 13-Jul-06 RMS Guarantee CBUFSIZE is at least 256
34 07-Jan-06 RMS Added support for breakpoint spaces
35 Added REG_FIT flag
36 16-Aug-05 RMS Fixed C++ declaration and cast problems
37 11-Mar-05 RMS Moved 64b data type definitions outside USE_INT64
38 07-Feb-05 RMS Added assertion fail stop
39 05-Nov-04 RMS Added support for SHOW opt=val
40 20-Oct-04 RMS Converted all base types to typedefs
41 21-Sep-04 RMS Added switch to flag stop message printout
42 06-Feb-04 RMS Moved device and unit user flags fields (V3.2)
43 RMS Added REG_VMAD
44 29-Dec-03 RMS Added output stall status
45 15-Jun-03 RMS Added register flag REG_VMIO
46 23-Apr-03 RMS Revised for 32b/64b t_addr
47 14-Mar-03 RMS Lengthened default serial output wait
48 31-Mar-03 RMS Added u5, u6 fields
49 18-Mar-03 RMS Added logical name support
50 Moved magtape definitions to sim_tape.h
51 Moved breakpoint definitions from scp.c
52 03-Mar-03 RMS Added sim_fsize
53 08-Feb-03 RMS Changed sim_os_sleep to void, added match_ext
54 05-Jan-03 RMS Added hidden switch definitions, device dyn memory support,
55 parameters for function pointers, case sensitive SET support
56 22-Dec-02 RMS Added break flag
57 08-Oct-02 RMS Increased simulator error code space
58 Added Telnet errors
59 Added end of medium support
60 Added help messages to CTAB
61 Added flag and context fields to DEVICE
62 Added restore flag masks
63 Revised 64b definitions
64 02-May-02 RMS Removed log status codes
65 22-Apr-02 RMS Added magtape record length error
66 30-Dec-01 RMS Generalized timer package, added circular arrays
67 07-Dec-01 RMS Added breakpoint package
68 01-Dec-01 RMS Added read-only unit support, extended SET/SHOW features,
69 improved error messages
70 24-Nov-01 RMS Added unit-based registers
71 27-Sep-01 RMS Added queue count prototype
72 17-Sep-01 RMS Removed multiple console support
73 07-Sep-01 RMS Removed conditional externs on function prototypes
74 31-Aug-01 RMS Changed int64 to t_int64 for Windoze
75 17-Jul-01 RMS Added additional function prototypes
76 27-May-01 RMS Added multiple console support
77 15-May-01 RMS Increased string buffer size
78 25-Feb-01 RMS Revisions for V2.6
79 15-Oct-00 RMS Editorial revisions for V2.5
80 11-Jul-99 RMS Added unsigned int data types
81 14-Apr-99 RMS Converted t_addr to unsigned
82 04-Oct-98 RMS Additional definitions for V2.4
83
84 The interface between the simulator control package (SCP) and the
85 simulator consists of the following routines and data structures
86
87 sim_name simulator name string
88 sim_devices[] array of pointers to simulated devices
89 sim_PC pointer to saved PC register descriptor
90 sim_interval simulator interval to next event
91 sim_stop_messages[] array of pointers to stop messages
92 sim_instr() instruction execution routine
93 sim_load() binary loader routine
94 sim_emax maximum number of words in an instruction
95
96 In addition, the simulator must supply routines to print and parse
97 architecture specific formats
98
99 print_sym print symbolic output
100 parse_sym parse symbolic input
101 */
102
103 #ifndef _SIM_DEFS_H_
104 #define _SIM_DEFS_H_ 0
105
106 #include <stddef.h>
107 #include <stdlib.h>
108 #include <stdio.h>
109 #include <stdarg.h>
110 #include <string.h>
111 #include <errno.h>
112 #include <limits.h>
113
114 #ifndef TRUE
115 #define TRUE 1
116 #define FALSE 0
117 #endif
118
119 /* Length specific integer declarations */
120
121 typedef signed char int8;
122 typedef signed short int16;
123 typedef signed int int32;
124 typedef unsigned char uint8;
125 typedef unsigned short uint16;
126 typedef unsigned int uint32;
127 typedef int t_stat; /* status */
128 typedef int t_bool; /* boolean */
129
130 /* 64b integers */
131
132 #if defined (__GNUC__) /* GCC */
133 typedef signed long long t_int64;
134 typedef unsigned long long t_uint64;
135 #elif defined (_WIN32) /* Windows */
136 typedef signed __int64 t_int64;
137 typedef unsigned __int64 t_uint64;
138 #elif (defined (__ALPHA) || defined (__ia64)) && defined (VMS) /* 64b VMS */
139 typedef signed __int64 t_int64;
140 typedef unsigned __int64 t_uint64;
141 #elif defined (__ALPHA) && defined (__unix__) /* Alpha UNIX */
142 typedef signed long t_int64;
143 typedef unsigned long t_uint64;
144 #else /* default */
145 #define t_int64 signed long long
146 #define t_uint64 unsigned long long
147 #endif /* end 64b */
148
149 #if defined (USE_INT64) /* 64b data */
150 typedef t_int64 t_svalue; /* signed value */
151 typedef t_uint64 t_value; /* value */
152 #else /* 32b data */
153 typedef int32 t_svalue;
154 typedef uint32 t_value;
155 #endif /* end 64b data */
156
157 #if defined (USE_INT64) && defined (USE_ADDR64) /* 64b address */
158 typedef t_uint64 t_addr;
159 #define T_ADDR_W 64
160 #else /* 32b address */
161 typedef uint32 t_addr;
162 #define T_ADDR_W 32
163 #endif /* end 64b address */
164
165 /* Inlining */
166
167 #if defined (__GNUC__) /* GCC */
168 #define SIM_INLINE inline
169 #define SIM_INLINE_GCC
170 #elif defined (_MSC_VER) /* Microsoft C Compilers */
171 #define SIM_INLINE __inline
172 #else /* default */
173 #define SIM_INLINE
174 #endif
175
176 /* System independent definitions */
177
178 #define FLIP_SIZE (1 << 16) /* flip buf size */
179 #if !defined (PATH_MAX) /* usually in limits */
180 #define PATH_MAX 512
181 #endif
182 #if (PATH_MAX >= 128)
183 #define CBUFSIZE (128 + PATH_MAX) /* string buf size */
184 #else
185 #define CBUFSIZE 256
186 #endif
187
188 /* Breakpoint spaces definitions */
189
190 #define SIM_BKPT_N_SPC 64 /* max number spaces */
191 #define SIM_BKPT_V_SPC 26 /* location in arg */
192
193 /* Extended switch definitions (bits >= 26) */
194
195 #define SIM_SW_HIDE (1u << 26) /* enable hiding */
196 #define SIM_SW_REST (1u << 27) /* attach/restore */
197 #define SIM_SW_REG (1u << 28) /* register value */
198 #define SIM_SW_STOP (1u << 29) /* stop message */
199
200 /* Simulator status codes
201
202 0 ok
203 1 - (SCPE_BASE - 1) simulator specific
204 SCPE_BASE - n general
205 */
206
207 #define SCPE_OK 0 /* normal return */
208 #define SCPE_BASE 64 /* base for messages */
209 #define SCPE_NXM (SCPE_BASE + 0) /* nxm */
210 #define SCPE_UNATT (SCPE_BASE + 1) /* no file */
211 #define SCPE_IOERR (SCPE_BASE + 2) /* I/O error */
212 #define SCPE_CSUM (SCPE_BASE + 3) /* loader cksum */
213 #define SCPE_FMT (SCPE_BASE + 4) /* loader format */
214 #define SCPE_NOATT (SCPE_BASE + 5) /* not attachable */
215 #define SCPE_OPENERR (SCPE_BASE + 6) /* open error */
216 #define SCPE_MEM (SCPE_BASE + 7) /* alloc error */
217 #define SCPE_ARG (SCPE_BASE + 8) /* argument error */
218 #define SCPE_STEP (SCPE_BASE + 9) /* step expired */
219 #define SCPE_UNK (SCPE_BASE + 10) /* unknown command */
220 #define SCPE_RO (SCPE_BASE + 11) /* read only */
221 #define SCPE_INCOMP (SCPE_BASE + 12) /* incomplete */
222 #define SCPE_STOP (SCPE_BASE + 13) /* sim stopped */
223 #define SCPE_EXIT (SCPE_BASE + 14) /* sim exit */
224 #define SCPE_TTIERR (SCPE_BASE + 15) /* console tti err */
225 #define SCPE_TTOERR (SCPE_BASE + 16) /* console tto err */
226 #define SCPE_EOF (SCPE_BASE + 17) /* end of file */
227 #define SCPE_REL (SCPE_BASE + 18) /* relocation error */
228 #define SCPE_NOPARAM (SCPE_BASE + 19) /* no parameters */
229 #define SCPE_ALATT (SCPE_BASE + 20) /* already attached */
230 #define SCPE_TIMER (SCPE_BASE + 21) /* hwre timer err */
231 #define SCPE_SIGERR (SCPE_BASE + 22) /* signal err */
232 #define SCPE_TTYERR (SCPE_BASE + 23) /* tty setup err */
233 #define SCPE_SUB (SCPE_BASE + 24) /* subscript err */
234 #define SCPE_NOFNC (SCPE_BASE + 25) /* func not imp */
235 #define SCPE_UDIS (SCPE_BASE + 26) /* unit disabled */
236 #define SCPE_NORO (SCPE_BASE + 27) /* rd only not ok */
237 #define SCPE_INVSW (SCPE_BASE + 28) /* invalid switch */
238 #define SCPE_MISVAL (SCPE_BASE + 29) /* missing value */
239 #define SCPE_2FARG (SCPE_BASE + 30) /* too few arguments */
240 #define SCPE_2MARG (SCPE_BASE + 31) /* too many arguments */
241 #define SCPE_NXDEV (SCPE_BASE + 32) /* nx device */
242 #define SCPE_NXUN (SCPE_BASE + 33) /* nx unit */
243 #define SCPE_NXREG (SCPE_BASE + 34) /* nx register */
244 #define SCPE_NXPAR (SCPE_BASE + 35) /* nx parameter */
245 #define SCPE_NEST (SCPE_BASE + 36) /* nested DO */
246 #define SCPE_IERR (SCPE_BASE + 37) /* internal error */
247 #define SCPE_MTRLNT (SCPE_BASE + 38) /* tape rec lnt error */
248 #define SCPE_LOST (SCPE_BASE + 39) /* Telnet conn lost */
249 #define SCPE_TTMO (SCPE_BASE + 40) /* Telnet conn timeout */
250 #define SCPE_STALL (SCPE_BASE + 41) /* Telnet conn stall */
251 #define SCPE_AFAIL (SCPE_BASE + 42) /* assert failed */
252 #define SCPE_KFLAG 0010000 /* tti data flag */
253 #define SCPE_BREAK 0020000 /* tti break flag */
254
255 /* Print value format codes */
256
257 #define PV_RZRO 0 /* right, zero fill */
258 #define PV_RSPC 1 /* right, space fill */
259 #define PV_LEFT 2 /* left justify */
260
261 /* Default timing parameters */
262
263 #define KBD_POLL_WAIT 5000 /* keyboard poll */
264 #define KBD_MAX_WAIT 500000
265 #define SERIAL_IN_WAIT 100 /* serial in time */
266 #define SERIAL_OUT_WAIT 100 /* serial output */
267 #define NOQUEUE_WAIT 10000 /* min check time */
268 #define KBD_LIM_WAIT(x) (((x) > KBD_MAX_WAIT)? KBD_MAX_WAIT: (x))
269 #define KBD_WAIT(w,s) ((w)? w: KBD_LIM_WAIT (s))
270
271 /* Convert switch letter to bit mask */
272
273 #define SWMASK(x) (1u << (((int) (x)) - ((int) 'A')))
274
275 /* String match */
276
277 #define MATCH_CMD(ptr,cmd) strncmp ((ptr), (cmd), strlen (ptr))
278
279 /* Device data structure */
280
281 struct sim_device {
282 char *name; /* name */
283 struct sim_unit *units; /* units */
284 struct sim_reg *registers; /* registers */
285 struct sim_mtab *modifiers; /* modifiers */
286 uint32 numunits; /* #units */
287 uint32 aradix; /* address radix */
288 uint32 awidth; /* address width */
289 uint32 aincr; /* addr increment */
290 uint32 dradix; /* data radix */
291 uint32 dwidth; /* data width */
292 t_stat (*examine)(t_value *v, t_addr a, struct sim_unit *up,
293 int32 sw); /* examine routine */
294 t_stat (*deposit)(t_value v, t_addr a, struct sim_unit *up,
295 int32 sw); /* deposit routine */
296 t_stat (*reset)(struct sim_device *dp);/* reset routine */
297 t_stat (*boot)(int32 u, struct sim_device *dp);
298 /* boot routine */
299 t_stat (*attach)(struct sim_unit *up, char *cp);
300 /* attach routine */
301 t_stat (*detach)(struct sim_unit *up); /* detach routine */
302 void *ctxt; /* context */
303 uint32 flags; /* flags */
304 uint32 dctrl; /* debug control */
305 struct sim_debtab *debflags; /* debug flags */
306 t_stat (*msize)(struct sim_unit *up, int32 v, char *cp, void *dp);
307 /* mem size routine */
308 char *lname; /* logical name */
309 };
310
311 /* Device flags */
312
313 #define DEV_V_DIS 0 /* dev disabled */
314 #define DEV_V_DISABLE 1 /* dev disable-able */
315 #define DEV_V_DYNM 2 /* mem size dynamic */
316 #define DEV_V_NET 3 /* network attach */
317 #define DEV_V_DEBUG 4 /* debug capability */
318 #define DEV_V_RAW 5 /* raw supported */
319 #define DEV_V_RAWONLY 6 /* only raw supported */
320 #define DEV_V_UF_31 12 /* user flags, V3.1 */
321 #define DEV_V_UF 16 /* user flags */
322 #define DEV_V_RSV 31 /* reserved */
323
324 #define DEV_DIS (1 << DEV_V_DIS)
325 #define DEV_DISABLE (1 << DEV_V_DISABLE)
326 #define DEV_DYNM (1 << DEV_V_DYNM)
327 #define DEV_NET (1 << DEV_V_NET)
328 #define DEV_DEBUG (1 << DEV_V_DEBUG)
329 #define DEV_RAW (1 << DEV_V_RAW)
330 #define DEV_RAWONLY (1 << DEV_V_RAWONLY)
331
332 #define DEV_UFMASK_31 (((1u << DEV_V_RSV) - 1) & ~((1u << DEV_V_UF_31) - 1))
333 #define DEV_UFMASK (((1u << DEV_V_RSV) - 1) & ~((1u << DEV_V_UF) - 1))
334 #define DEV_RFLAGS (DEV_UFMASK|DEV_DIS) /* restored flags */
335
336 /* Unit data structure
337
338 Parts of the unit structure are device specific, that is, they are
339 not referenced by the simulator control package and can be freely
340 used by device simulators. Fields starting with 'buf', and flags
341 starting with 'UF', are device specific. The definitions given here
342 are for a typical sequential device.
343 */
344
345 struct sim_unit {
346 struct sim_unit *next; /* next active */
347 t_stat (*action)(struct sim_unit *up); /* action routine */
348 char *filename; /* open file name */
349 FILE *fileref; /* file reference */
350 void *filebuf; /* memory buffer */
351 uint32 hwmark; /* high water mark */
352 int32 time; /* time out */
353 uint32 flags; /* flags */
354 t_addr capac; /* capacity */
355 t_addr pos; /* file position */
356 int32 buf; /* buffer */
357 int32 wait; /* wait */
358 int32 u3; /* device specific */
359 int32 u4; /* device specific */
360 int32 u5; /* device specific */
361 int32 u6; /* device specific */
362 };
363
364 /* Unit flags */
365
366 #define UNIT_V_UF_31 12 /* dev spec, V3.1 */
367 #define UNIT_V_UF 16 /* device specific */
368 #define UNIT_V_RSV 31 /* reserved!! */
369
370 #define UNIT_ATTABLE 000001 /* attachable */
371 #define UNIT_RO 000002 /* read only */
372 #define UNIT_FIX 000004 /* fixed capacity */
373 #define UNIT_SEQ 000010 /* sequential */
374 #define UNIT_ATT 000020 /* attached */
375 #define UNIT_BINK 000040 /* K = power of 2 */
376 #define UNIT_BUFABLE 000100 /* bufferable */
377 #define UNIT_MUSTBUF 000200 /* must buffer */
378 #define UNIT_BUF 000400 /* buffered */
379 #define UNIT_ROABLE 001000 /* read only ok */
380 #define UNIT_DISABLE 002000 /* disable-able */
381 #define UNIT_DIS 004000 /* disabled */
382 #define UNIT_RAW 010000 /* raw mode */
383 #define UNIT_TEXT 020000 /* text mode */
384 #define UNIT_IDLE 040000 /* idle eligible */
385
386 #define UNIT_UFMASK_31 (((1u << UNIT_V_RSV) - 1) & ~((1u << UNIT_V_UF_31) - 1))
387 #define UNIT_UFMASK (((1u << UNIT_V_RSV) - 1) & ~((1u << UNIT_V_UF) - 1))
388 #define UNIT_RFLAGS (UNIT_UFMASK|UNIT_DIS) /* restored flags */
389
390 /* Register data structure */
391
392 struct sim_reg {
393 char *name; /* name */
394 void *loc; /* location */
395 uint32 radix; /* radix */
396 uint32 width; /* width */
397 uint32 offset; /* starting bit */
398 uint32 depth; /* save depth */
399 uint32 flags; /* flags */
400 uint32 qptr; /* circ q ptr */
401 };
402
403 #define REG_FMT 00003 /* see PV_x */
404 #define REG_RO 00004 /* read only */
405 #define REG_HIDDEN 00010 /* hidden */
406 #define REG_NZ 00020 /* must be non-zero */
407 #define REG_UNIT 00040 /* in unit struct */
408 #define REG_CIRC 00100 /* circular array */
409 #define REG_VMIO 00200 /* use VM data print/parse */
410 #define REG_VMAD 00400 /* use VM addr print/parse */
411 #define REG_FIT 01000 /* fit access to size */
412 #define REG_HRO (REG_RO | REG_HIDDEN) /* hidden, read only */
413
414 /* Command tables, base and alternate formats */
415
416 struct sim_ctab {
417 char *name; /* name */
418 t_stat (*action)(int32 flag, char *cptr);
419 /* action routine */
420 int32 arg; /* argument */
421 char *help; /* help string */
422 };
423
424 struct sim_c1tab {
425 char *name; /* name */
426 t_stat (*action)(struct sim_device *dptr, struct sim_unit *uptr,
427 int32 flag, char *cptr); /* action routine */
428 int32 arg; /* argument */
429 char *help; /* help string */
430 };
431
432 struct sim_shtab {
433 char *name; /* name */
434 t_stat (*action)(FILE *st, struct sim_device *dptr,
435 struct sim_unit *uptr, int32 flag, char *cptr);
436 int32 arg; /* argument */
437 char *help; /* help string */
438 };
439
440 /* Modifier table - only extended entries have disp, reg, or flags */
441
442 struct sim_mtab {
443 uint32 mask; /* mask */
444 uint32 match; /* match */
445 char *pstring; /* print string */
446 char *mstring; /* match string */
447 t_stat (*valid)(struct sim_unit *up, int32 v, char *cp, void *dp);
448 /* validation routine */
449 t_stat (*disp)(FILE *st, struct sim_unit *up, int32 v, void *dp);
450 /* display routine */
451 void *desc; /* value descriptor */
452 /* REG * if MTAB_VAL */
453 /* int * if not */
454 };
455
456 #define MTAB_XTD (1u << UNIT_V_RSV) /* ext entry flag */
457 #define MTAB_VDV 001 /* valid for dev */
458 #define MTAB_VUN 002 /* valid for unit */
459 #define MTAB_VAL 004 /* takes a value */
460 #define MTAB_NMO 010 /* only if named */
461 #define MTAB_NC 020 /* no UC conversion */
462 #define MTAB_SHP 040 /* show takes parameter */
463
464 /* Search table */
465
466 struct sim_schtab {
467 int32 logic; /* logical operator */
468 int32 boolop; /* boolean operator */
469 t_value mask; /* mask for logical */
470 t_value comp; /* comparison for boolean */
471 };
472
473 /* Breakpoint table */
474
475 struct sim_brktab {
476 t_addr addr; /* address */
477 int32 typ; /* mask of types */
478 int32 cnt; /* proceed count */
479 char *act; /* action string */
480 };
481
482 /* Debug table */
483
484 struct sim_debtab {
485 char *name; /* control name */
486 uint32 mask; /* control bit */
487 };
488
489 #define DEBUG_PRS(d) (sim_deb && d.dctrl)
490 #define DEBUG_PRD(d) (sim_deb && d->dctrl)
491 #define DEBUG_PRI(d,m) (sim_deb && (d.dctrl & (m)))
492 #define DEBUG_PRJ(d,m) (sim_deb && (d->dctrl & (m)))
493
494 /* The following macros define structure contents */
495
496 #define UDATA(act,fl,cap) NULL,act,NULL,NULL,NULL,0,0,(fl),(cap),0,0
497
498 #if defined (__STDC__) || defined (_WIN32)
499 #define ORDATA(nm,loc,wd) #nm, &(loc), 8, (wd), 0, 1
500 #define DRDATA(nm,loc,wd) #nm, &(loc), 10, (wd), 0, 1
501 #define HRDATA(nm,loc,wd) #nm, &(loc), 16, (wd), 0, 1
502 #define FLDATA(nm,loc,pos) #nm, &(loc), 2, 1, (pos), 1
503 #define GRDATA(nm,loc,rdx,wd,pos) #nm, &(loc), (rdx), (wd), (pos), 1
504 #define BRDATA(nm,loc,rdx,wd,dep) #nm, (loc), (rdx), (wd), 0, (dep)
505 #define URDATA(nm,loc,rdx,wd,off,dep,fl) \
506 #nm, &(loc), (rdx), (wd), (off), (dep), ((fl) | REG_UNIT)
507 #else
508 #define ORDATA(nm,loc,wd) "nm", &(loc), 8, (wd), 0, 1
509 #define DRDATA(nm,loc,wd) "nm", &(loc), 10, (wd), 0, 1
510 #define HRDATA(nm,loc,wd) "nm", &(loc), 16, (wd), 0, 1
511 #define FLDATA(nm,loc,pos) "nm", &(loc), 2, 1, (pos), 1
512 #define GRDATA(nm,loc,rdx,wd,pos) "nm", &(loc), (rdx), (wd), (pos), 1
513 #define BRDATA(nm,loc,rdx,wd,dep) "nm", (loc), (rdx), (wd), 0, (dep)
514 #define URDATA(nm,loc,rdx,wd,off,dep,fl) \
515 "nm", &(loc), (rdx), (wd), (off), (dep), ((fl) | REG_UNIT)
516 #endif
517
518 /* Typedefs for principal structures */
519
520 typedef struct sim_device DEVICE;
521 typedef struct sim_unit UNIT;
522 typedef struct sim_reg REG;
523 typedef struct sim_ctab CTAB;
524 typedef struct sim_c1tab C1TAB;
525 typedef struct sim_shtab SHTAB;
526 typedef struct sim_mtab MTAB;
527 typedef struct sim_schtab SCHTAB;
528 typedef struct sim_brktab BRKTAB;
529 typedef struct sim_debtab DEBTAB;
530
531 /* Function prototypes */
532
533 #include "scp.h"
534 #include "sim_console.h"
535 #include "sim_timer.h"
536 #include "sim_fio.h"
537
538 #endif