From: j8takagi <j8takagi@nifty.com> Date: Sun, 7 Mar 2010 02:59:03 +0000 (+0900) Subject: reset関数の位置を変更 X-Git-Tag: v0.1p15~53 X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54b6bf4b0ce20872db02bae2f047c6574c09575c;p=YACASL2.git reset関数の位置を変更 --- diff --git a/include/casl2.h b/include/casl2.h index 3d602c4..5d21418 100644 --- a/include/casl2.h +++ b/include/casl2.h @@ -98,6 +98,9 @@ extern CMDCODETAB **cmdtype_code; extern CMDCODETAB **code_type; extern int cmdtabsize; +/* COMET IIä»®æ³ãã·ã³ã®ãªã»ãã */ +void reset(); + /* å½ä»¤ã¨å½ä»¤ã¿ã¤ãããã¼ã®ããã·ã¥è¡¨ãä½æãã */ bool create_cmdtype_code(); diff --git a/include/exec.h b/include/exec.h index 7262af5..bd06f39 100644 --- a/include/exec.h +++ b/include/exec.h @@ -19,7 +19,7 @@ extern EXECMODE execmode; /* å®è¡ã®ã¨ã©ã¼å®ç¾© */ bool addcerrlist_exec(); -/* ä»®æ³ãã·ã³ã®ãªã»ãã */ +/* COMET IIä»®æ³ãã·ã³ã®ãªã»ãã */ void reset(); /* ã³ã¼ãã®å®è¡ */ diff --git a/src/exec.c b/src/exec.c index 6e0af10..2cd6d8a 100644 --- a/src/exec.c +++ b/src/exec.c @@ -265,20 +265,6 @@ WORD srl(WORD val0, WORD val1) return res; } -/* COMET IIä»®æ³ãã·ã³ã®ãªã»ãã */ -void reset() -{ - int i; - for(i = 0; i < REGSIZE; i++) { - GR[i] = 0x0; - } - SP = PR = FR = 0x0; - memory = malloc(memsize * sizeof(WORD)); - for(i = 0; i < memsize; i++) { - memory[i] = 0x0; - } -} - /* ä»®æ³ãã·ã³COMET IIã§ã®å®è¡ */ void exec() { diff --git a/src/struct.c b/src/struct.c index 89daa05..f21c92e 100644 --- a/src/struct.c +++ b/src/struct.c @@ -17,3 +17,17 @@ WORD startptr = 0x0; /* å®è¡çµäºçªå° */ WORD endptr = 0x0; + +/* COMET IIä»®æ³ãã·ã³ã®ãªã»ãã */ +void reset() +{ + int i; + for(i = 0; i < REGSIZE; i++) { + GR[i] = 0x0; + } + SP = PR = FR = 0x0; + memory = malloc(memsize * sizeof(WORD)); + for(i = 0; i < memsize; i++) { + memory[i] = 0x0; + } +}