projects
/
YACASL2.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
f21c92e099a3b8ec00424c07d4fd6d7709d82e5d
[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
/* メモリーサイズ */
10
int memsize = DEFAULT_MEMSIZE;
11
12
/* クロック周波数 */
13
int clocks = DEFAULT_CLOCKS;
14
15
/* 実行開始番地 */
16
WORD startptr = 0x0;
17
18
/* 実行終了番地 */
19
WORD endptr = 0x0;
20
21
/* COMET II仮想マシンのリセット */
22
void reset()
23
{
24
int i;
25
for(i = 0; i < REGSIZE; i++) {
26
GR[i] = 0x0;
27
}
28
SP = PR = FR = 0x0;
29
memory = malloc(memsize * sizeof(WORD));
30
for(i = 0; i < memsize; i++) {
31
memory[i] = 0x0;
32
}
33
}