b59161128732685aa5e9dc3904f81c14238d2c96
[YACASL2.git] / src / struct.c
1 #include "casl2.h"
2
3 /* COMET IIのメモリ */
4 WORD *memory;
5
6 /* COMET IIのCPUレジスタ */
7 WORD GR[REGSIZE], SP, PR, FR;
8
9 CERRARRAY cerr[] = {
10     { 101, "label already defined" },
11     { 102, "label table is full" },
12     { 103, "label not found" },
13     { 104, "label length is too long" },
14     { 105, "no command in the line" },
15     { 106, "operand count mismatch" },
16     { 107, "no label in START" },
17     { 108, "not command of operand \"r\"" },
18     { 109, "not command of operand \"r1,r2\"" },
19     { 110, "not command of operand \"r,adr[,x]\"" },
20     { 111, "not command of operand \"adr[,x]\"" },
21     { 112, "not command of no operand" },
22     { 113, "command not defined" },
23     { 114, "not integer" },
24     { 115, "not hex" },
25     { 116, "out of hex range" },
26     { 117, "operand is too many" },
27     { 118, "operand length is too long" },
28     { 119, "out of COMET II memory" },
29     { 120, "GR0 in operand x" },
30     { 121, "cannot get operand token" },
31     { 122, "cannot create hash table" },
32     { 123, "illegal string" },
33     { 124, "more than one character in literal" },
34     { 201, "execute - out of COMET II memory" },
35     { 202, "SVC input - out of Input memory" },
36     { 203, "SVC output - out of COMET II memory" },
37     { 204, "Program Register (PR) - out of COMET II memory" },
38     { 205, "Stack Pointer (SP) - cannot allocate stack buffer" },
39     { 206, "Address - out of COMET II memory" },
40     { 207, "Stack Pointer (SP) - out of COMET II memory" },
41     { 0, NULL },
42 };
43
44 /* メモリーサイズ */
45 int memsize = DEFAULT_MEMSIZE;
46
47 /* クロック周波数 */
48 int clocks = DEFAULT_CLOCKS;
49
50 /* 実行開始番地 */
51 WORD startptr = 0x0;
52
53 /* 実行終了番地 */
54 WORD endptr = 0x0;