<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>doc_inner/gnu_global/S/15541.html</title>
<meta name='robots' content='noindex,nofollow' />
<meta name='generator' content='GLOBAL-6.6.14' />
<meta http-equiv='Content-Style-Type' content='text/css' />
<link rel='stylesheet' type='text/css' href='../style.css' />
</head>
<body>
<a id='TOP' name='TOP'></a><h2 class='header'><a href='../mains.html'>root</a>/<a href='../files/21157.html'>doc_inner</a>/<a href='../files/21160.html'>gnu_global</a>/<a href='../files/21165.html'>S</a>/15541.html</h2>
<em class='comment'>/* [<][>][^][v][top]<a href='#BOTTOM'>[bottom]</a><a href='../mains.html'>[index]</a><a href='../help.html'>[help]</a> */</em>
<hr />
<pre>
<a id='L1' name='L1'></a><!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<a id='L2' name='L2'></a><html xmlns='http://www.w3.org/1999/xhtml'>
<a id='L3' name='L3'></a><head>
<a id='L4' name='L4'></a><title>src/struct.c</title>
<a id='L5' name='L5'></a><meta name='robots' content='noindex,nofollow' />
<a id='L6' name='L6'></a><meta name='generator' content='GLOBAL-6.6.14' />
<a id='L7' name='L7'></a><meta http-equiv='Content-Style-Type' content='text/css' />
<a id='L8' name='L8'></a><link rel='stylesheet' type='text/css' href='../style.css' />
<a id='L9' name='L9'></a></head>
<a id='L10' name='L10'></a><body>
<a id='L11' name='L11'></a><a id='TOP' name='TOP'></a><h2 class='header'><a href='../mains.html'>root</a>/<a href='../files/15623.html'>src</a>/struct.c</h2>
<a id='L12' name='L12'></a><em class='comment'>/* [&lt;][&gt;]<a href='#L99'>[^]</a><a href='#L331'>[v]</a>[top]<a href='#BOTTOM'>[bottom]</a><a href='../mains.html'>[index]</a><a href='../help.html'>[help]</a> */</em>
<a id='L13' name='L13'></a><hr />
<a id='L14' name='L14'></a><h2 class='header'>DEFINITIONS</h2>
<a id='L15' name='L15'></a>This source file includes following definitions.
<a id='L16' name='L16'></a><ol>
<a id='L17' name='L17'></a><li><a href='#L99' title='Defined at 99.'>hash_cmdtype</a></li>
<a id='L18' name='L18'></a><li><a href='#L124' title='Defined at 124.'>create_cmdtable</a></li>
<a id='L19' name='L19'></a><li><a href='#L146' title='Defined at 146.'>free_cmdtable</a></li>
<a id='L20' name='L20'></a><li><a href='#L164' title='Defined at 164.'>getcmdcode</a></li>
<a id='L21' name='L21'></a><li><a href='#L182' title='Defined at 182.'>hash_code</a></li>
<a id='L22' name='L22'></a><li><a href='#L199' title='Defined at 199.'>getcmdptr</a></li>
<a id='L23' name='L23'></a><li><a href='#L216' title='Defined at 216.'>getcmdtype</a></li>
<a id='L24' name='L24'></a><li><a href='#L233' title='Defined at 233.'>getcmdname</a></li>
<a id='L25' name='L25'></a><li><a href='#L251' title='Defined at 251.'>grstr</a></li>
<a id='L26' name='L26'></a><li><a href='#L261' title='Defined at 261.'>memsize_str2word</a></li>
<a id='L27' name='L27'></a><li><a href='#L268' title='Defined at 268.'>comet2_init</a></li>
<a id='L28' name='L28'></a><li><a href='#L291' title='Defined at 291.'>cpu_reset</a></li>
<a id='L29' name='L29'></a><li><a href='#L304' title='Defined at 304.'>memory_reset</a></li>
<a id='L30' name='L30'></a><li><a href='#L311' title='Defined at 311.'>comet2_reset</a></li>
<a id='L31' name='L31'></a><li><a href='#L320' title='Defined at 320.'>comet2_resetall</a></li>
<a id='L32' name='L32'></a><li><a href='#L331' title='Defined at 331.'>comet2_shutdown</a></li>
<a id='L33' name='L33'></a></ol>
<a id='L34' name='L34'></a><hr />
<a id='L35' name='L35'></a><pre>
<a id='L36' name='L36'></a><a id='L1' name='L1'></a> 1 <em class='sharp'>#include</em> &lt;errno.h&gt;
<a id='L37' name='L37'></a><a id='L2' name='L2'></a> 2 <em class='sharp'>#include</em> "<a href='15091.html'>struct.h</a>"
<a id='L38' name='L38'></a><a id='L3' name='L3'></a> 3 <em class='sharp'>#include</em> "<a href='15094.html'>exec.h</a>"
<a id='L39' name='L39'></a><a id='L4' name='L4'></a> 4
<a id='L40' name='L40'></a><a id='L5' name='L5'></a> 5 <em class='comment'>/**</em>
<a id='L41' name='L41'></a><a id='L6' name='L6'></a> 6 <em class='comment'> * COMET IIの仮想実行マシンシステム</em>
<a id='L42' name='L42'></a><a id='L7' name='L7'></a> 7 <em class='comment'> */</em>
<a id='L43' name='L43'></a><a id='L8' name='L8'></a> 8 <a href='../S/15091.html#L53' title='Defined at 53 in include/struct.h.'>SYSTEM</a> *<a href='../Y/224.html' title='Multiple used in 243 places.'>sys</a> = <a href='../Y/4.html' title='Multiple used in 195 places.'>NULL</a>;
<a id='L44' name='L44'></a><a id='L9' name='L9'></a> 9
<a id='L45' name='L45'></a><a id='L10' name='L10'></a> 10 <em class='comment'>/**</em>
<a id='L46' name='L46'></a><a id='L11' name='L11'></a> 11 <em class='comment'> * プログラム実行時の開始と終了のアドレス</em>
<a id='L47' name='L47'></a><a id='L12' name='L12'></a> 12 <em class='comment'> */</em>
<a id='L48' name='L48'></a><a id='L13' name='L13'></a> 13 <a href='../S/15091.html#L137' title='Defined at 137 in include/struct.h.'>EXECPTR</a> *<a href='../Y/91.html' title='Multiple used in 25 places.'>execptr</a> = <a href='../Y/4.html' title='Multiple used in 195 places.'>NULL</a>;
<a id='L49' name='L49'></a><a id='L14' name='L14'></a> 14
<a id='L50' name='L50'></a><a id='L15' name='L15'></a> 15 <em class='comment'>/**</em>
<a id='L51' name='L51'></a><a id='L16' name='L16'></a> 16 <em class='comment'> * システムCOMET IIの命令表</em>
<a id='L52' name='L52'></a><a id='L17' name='L17'></a> 17 <em class='comment'> */</em>
<a id='L53' name='L53'></a><a id='L18' name='L18'></a> 18 <strong class='reserved'>static</strong> <strong class='reserved'>const</strong> <a href='../S/15091.html#L120' title='Defined at 120 in include/struct.h.'>COMET2CMD</a> <a href='../Y/74.html' title='Multiple used in 5 places.'>comet2cmd</a>[] = <em class='brace'>{</em>
<a id='L54' name='L54'></a><a id='L19' name='L19'></a> 19 <em class='brace'>{</em> "NOP", <a href='../S/15091.html#L101' title='Defined at 101 in include/struct.h.'>NONE</a>, 0x0, <a href='../S/15510.html#L227' title='Defined at 227 in src/exec.c.'>nop</a> <em class='brace'>}</em>,
<a id='L55' name='L55'></a><a id='L20' name='L20'></a> 20 <em class='brace'>{</em> "LD", <a href='../S/15091.html#L80' title='Defined at 80 in include/struct.h.'>R_ADR_X</a>, 0x1000, <a href='../S/15510.html#L232' title='Defined at 232 in src/exec.c.'>ld_r_adr_x</a> <em class='brace'>}</em>,
<a id='L56' name='L56'></a><a id='L21' name='L21'></a> 21 <em class='brace'>{</em> "ST", <a href='../S/15091.html#L80' title='Defined at 80 in include/struct.h.'>R_ADR_X</a>, 0x1100, <a href='../S/15510.html#L246' title='Defined at 246 in src/exec.c.'>st</a> <em class='brace'>}</em>,
<a id='L57' name='L57'></a><a id='L22' name='L22'></a> 22 <em class='brace'>{</em> "LAD", <a href='../S/15091.html#L80' title='Defined at 80 in include/struct.h.'>R_ADR_X</a>, 0x1200, <a href='../S/15510.html#L253' title='Defined at 253 in src/exec.c.'>lad</a> <em class='brace'>}</em>,
<a id='L58' name='L58'></a><a id='L23' name='L23'></a> 23 <em class='brace'>{</em> "LD", <a href='../S/15091.html#L86' title='Defined at 86 in include/struct.h.'>R1_R2</a>, 0x1400, <a href='../S/15510.html#L239' title='Defined at 239 in src/exec.c.'>ld_r1_r2</a> <em class='brace'>}</em>,
<a id='L59' name='L59'></a><a id='L24' name='L24'></a> 24 <em class='brace'>{</em> "ADDA", <a href='../S/15091.html#L80' title='Defined at 80 in include/struct.h.'>R_ADR_X</a>, 0x2000, <a href='../S/15510.html#L279' title='Defined at 279 in src/exec.c.'>adda_r_adr_x</a> <em class='brace'>}</em>,
<a id='L60' name='L60'></a><a id='L25' name='L25'></a> 25 <em class='brace'>{</em> "SUBA", <a href='../S/15091.html#L80' title='Defined at 80 in include/struct.h.'>R_ADR_X</a>, 0x2100, <a href='../S/15510.html#L293' title='Defined at 293 in src/exec.c.'>suba_r_adr_x</a> <em class='brace'>}</em>,
<a id='L61' name='L61'></a><a id='L26' name='L26'></a> 26 <em class='brace'>{</em> "ADDL", <a href='../S/15091.html#L80' title='Defined at 80 in include/struct.h.'>R_ADR_X</a>, 0x2200, <a href='../S/15510.html#L339' title='Defined at 339 in src/exec.c.'>addl_r_adr_x</a> <em class='brace'>}</em>,
<a id='L62' name='L62'></a><a id='L27' name='L27'></a> 27 <em class='brace'>{</em> "SUBL", <a href='../S/15091.html#L80' title='Defined at 80 in include/struct.h.'>R_ADR_X</a>, 0x2300, <a href='../S/15510.html#L353' title='Defined at 353 in src/exec.c.'>subl_r_adr_x</a> <em class='brace'>}</em>,
<a id='L63' name='L63'></a><a id='L28' name='L28'></a> 28 <em class='brace'>{</em> "ADDA", <a href='../S/15091.html#L86' title='Defined at 86 in include/struct.h.'>R1_R2</a>, 0x2400, <a href='../S/15510.html#L286' title='Defined at 286 in src/exec.c.'>adda_r1_r2</a> <em class='brace'>}</em>,
<a id='L64' name='L64'></a><a id='L29' name='L29'></a> 29 <em class='brace'>{</em> "SUBA", <a href='../S/15091.html#L86' title='Defined at 86 in include/struct.h.'>R1_R2</a>, 0x2500, <a href='../S/15510.html#L300' title='Defined at 300 in src/exec.c.'>suba_r1_r2</a> <em class='brace'>}</em>,
<a id='L65' name='L65'></a><a id='L30' name='L30'></a> 30 <em class='brace'>{</em> "ADDL", <a href='../S/15091.html#L86' title='Defined at 86 in include/struct.h.'>R1_R2</a>, 0x2600, <a href='../S/15510.html#L346' title='Defined at 346 in src/exec.c.'>addl_r1_r2</a> <em class='brace'>}</em>,
<a id='L66' name='L66'></a><a id='L31' name='L31'></a> 31 <em class='brace'>{</em> "SUBL", <a href='../S/15091.html#L86' title='Defined at 86 in include/struct.h.'>R1_R2</a>, 0x2700, <a href='../S/15510.html#L360' title='Defined at 360 in src/exec.c.'>subl_r1_r2</a> <em class='brace'>}</em>,
<a id='L67' name='L67'></a><a id='L32' name='L32'></a> 32 <em class='brace'>{</em> "AND", <a href='../S/15091.html#L80' title='Defined at 80 in include/struct.h.'>R_ADR_X</a>, 0x3000, <a href='../S/15510.html#L367' title='Defined at 367 in src/exec.c.'>and_r_adr_x</a> <em class='brace'>}</em>,
<a id='L68' name='L68'></a><a id='L33' name='L33'></a> 33 <em class='brace'>{</em> "OR", <a href='../S/15091.html#L80' title='Defined at 80 in include/struct.h.'>R_ADR_X</a>, 0x3100, <a href='../S/15510.html#L381' title='Defined at 381 in src/exec.c.'>or_r_adr_x</a> <em class='brace'>}</em>,
<a id='L69' name='L69'></a><a id='L34' name='L34'></a> 34 <em class='brace'>{</em> "XOR", <a href='../S/15091.html#L80' title='Defined at 80 in include/struct.h.'>R_ADR_X</a>, 0x3200, <a href='../S/15510.html#L395' title='Defined at 395 in src/exec.c.'>xor_r_adr_x</a> <em class='brace'>}</em>,
<a id='L70' name='L70'></a><a id='L35' name='L35'></a> 35 <em class='brace'>{</em> "AND", <a href='../S/15091.html#L86' title='Defined at 86 in include/struct.h.'>R1_R2</a>, 0x3400, <a href='../S/15510.html#L374' title='Defined at 374 in src/exec.c.'>and_r1_r2</a> <em class='brace'>}</em>,
<a id='L71' name='L71'></a><a id='L36' name='L36'></a> 36 <em class='brace'>{</em> "OR", <a href='../S/15091.html#L86' title='Defined at 86 in include/struct.h.'>R1_R2</a>, 0x3500, <a href='../S/15510.html#L388' title='Defined at 388 in src/exec.c.'>or_r1_r2</a> <em class='brace'>}</em>,
<a id='L72' name='L72'></a><a id='L37' name='L37'></a> 37 <em class='brace'>{</em> "XOR", <a href='../S/15091.html#L86' title='Defined at 86 in include/struct.h.'>R1_R2</a>, 0x3600, <a href='../S/15510.html#L402' title='Defined at 402 in src/exec.c.'>xor_r1_r2</a> <em class='brace'>}</em>,
<a id='L73' name='L73'></a><a id='L38' name='L38'></a> 38 <em class='brace'>{</em> "CPA", <a href='../S/15091.html#L80' title='Defined at 80 in include/struct.h.'>R_ADR_X</a>, 0x4000, <a href='../S/15510.html#L419' title='Defined at 419 in src/exec.c.'>cpa_r_adr_x</a> <em class='brace'>}</em>,
<a id='L74' name='L74'></a><a id='L39' name='L39'></a> 39 <em class='brace'>{</em> "CPL", <a href='../S/15091.html#L80' title='Defined at 80 in include/struct.h.'>R_ADR_X</a>, 0x4100, <a href='../S/15510.html#L443' title='Defined at 443 in src/exec.c.'>cpl_r_adr_x</a> <em class='brace'>}</em>,
<a id='L75' name='L75'></a><a id='L40' name='L40'></a> 40 <em class='brace'>{</em> "CPA", <a href='../S/15091.html#L86' title='Defined at 86 in include/struct.h.'>R1_R2</a>, 0x4400, <a href='../S/15510.html#L426' title='Defined at 426 in src/exec.c.'>cpa_r1_r2</a> <em class='brace'>}</em>,
<a id='L76' name='L76'></a><a id='L41' name='L41'></a> 41 <em class='brace'>{</em> "CPL", <a href='../S/15091.html#L86' title='Defined at 86 in include/struct.h.'>R1_R2</a>, 0x4500, <a href='../S/15510.html#L450' title='Defined at 450 in src/exec.c.'>cpl_r1_r2</a> <em class='brace'>}</em>,
<a id='L77' name='L77'></a><a id='L42' name='L42'></a> 42 <em class='brace'>{</em> "SLA", <a href='../S/15091.html#L80' title='Defined at 80 in include/struct.h.'>R_ADR_X</a>, 0x5000, <a href='../S/15510.html#L457' title='Defined at 457 in src/exec.c.'>sla</a> <em class='brace'>}</em>,
<a id='L78' name='L78'></a><a id='L43' name='L43'></a> 43 <em class='brace'>{</em> "SRA", <a href='../S/15091.html#L80' title='Defined at 80 in include/struct.h.'>R_ADR_X</a>, 0x5100, <a href='../S/15510.html#L486' title='Defined at 486 in src/exec.c.'>sra</a> <em class='brace'>}</em>,
<a id='L79' name='L79'></a><a id='L44' name='L44'></a> 44 <em class='brace'>{</em> "SLL", <a href='../S/15091.html#L80' title='Defined at 80 in include/struct.h.'>R_ADR_X</a>, 0x5200, <a href='../S/15510.html#L518' title='Defined at 518 in src/exec.c.'>sll</a> <em class='brace'>}</em>,
<a id='L80' name='L80'></a><a id='L45' name='L45'></a> 45 <em class='brace'>{</em> "SRL", <a href='../S/15091.html#L80' title='Defined at 80 in include/struct.h.'>R_ADR_X</a>, 0x5300, <a href='../S/15510.html#L544' title='Defined at 544 in src/exec.c.'>srl</a> <em class='brace'>}</em>,
<a id='L81' name='L81'></a><a id='L46' name='L46'></a> 46 <em class='brace'>{</em> "JMI", <a href='../S/15091.html#L92' title='Defined at 92 in include/struct.h.'>ADR_X</a>, 0x6100, <a href='../S/15510.html#L580' title='Defined at 580 in src/exec.c.'>jmi</a> <em class='brace'>}</em>,
<a id='L82' name='L82'></a><a id='L47' name='L47'></a> 47 <em class='brace'>{</em> "JNZ", <a href='../S/15091.html#L92' title='Defined at 92 in include/struct.h.'>ADR_X</a>, 0x6200, <a href='../S/15510.html#L590' title='Defined at 590 in src/exec.c.'>jnz</a> <em class='brace'>}</em>,
<a id='L83' name='L83'></a><a id='L48' name='L48'></a> 48 <em class='brace'>{</em> "JZE", <a href='../S/15091.html#L92' title='Defined at 92 in include/struct.h.'>ADR_X</a>, 0x6300, <a href='../S/15510.html#L600' title='Defined at 600 in src/exec.c.'>jze</a> <em class='brace'>}</em>,
<a id='L84' name='L84'></a><a id='L49' name='L49'></a> 49 <em class='brace'>{</em> "JUMP", <a href='../S/15091.html#L92' title='Defined at 92 in include/struct.h.'>ADR_X</a>, 0x6400, <a href='../S/15510.html#L620' title='Defined at 620 in src/exec.c.'>jump</a> <em class='brace'>}</em>,
<a id='L85' name='L85'></a><a id='L50' name='L50'></a> 50 <em class='brace'>{</em> "JPL", <a href='../S/15091.html#L92' title='Defined at 92 in include/struct.h.'>ADR_X</a>, 0x6500, <a href='../S/15510.html#L570' title='Defined at 570 in src/exec.c.'>jpl</a> <em class='brace'>}</em>,
<a id='L86' name='L86'></a><a id='L51' name='L51'></a> 51 <em class='brace'>{</em> "JOV", <a href='../S/15091.html#L92' title='Defined at 92 in include/struct.h.'>ADR_X</a>, 0x6600, <a href='../S/15510.html#L610' title='Defined at 610 in src/exec.c.'>jov</a> <em class='brace'>}</em>,
<a id='L87' name='L87'></a><a id='L52' name='L52'></a> 52 <em class='brace'>{</em> "PUSH", <a href='../S/15091.html#L92' title='Defined at 92 in include/struct.h.'>ADR_X</a>, 0x7000, <a href='../S/15510.html#L626' title='Defined at 626 in src/exec.c.'>push</a> <em class='brace'>}</em>,
<a id='L88' name='L88'></a><a id='L53' name='L53'></a> 53 <em class='brace'>{</em> "POP", <a href='../S/15091.html#L97' title='Defined at 97 in include/struct.h.'>R_</a>, 0x7100, <a href='../S/15510.html#L634' title='Defined at 634 in src/exec.c.'>pop</a> <em class='brace'>}</em>,
<a id='L89' name='L89'></a><a id='L54' name='L54'></a> 54 <em class='brace'>{</em> "CALL", <a href='../S/15091.html#L92' title='Defined at 92 in include/struct.h.'>ADR_X</a>, 0x8000, <a href='../S/15510.html#L649' title='Defined at 649 in src/exec.c.'>call</a> <em class='brace'>}</em>,
<a id='L90' name='L90'></a><a id='L55' name='L55'></a> 55 <em class='brace'>{</em> "SVC", <a href='../S/15091.html#L92' title='Defined at 92 in include/struct.h.'>ADR_X</a>, 0xF000, <a href='../S/15510.html#L667' title='Defined at 667 in src/exec.c.'>svc</a> <em class='brace'>}</em>,
<a id='L91' name='L91'></a><a id='L56' name='L56'></a> 56 <em class='brace'>{</em> "RET", <a href='../S/15091.html#L101' title='Defined at 101 in include/struct.h.'>NONE</a>, 0x8100, <a href='../S/15510.html#L657' title='Defined at 657 in src/exec.c.'>ret</a> <em class='brace'>}</em>,
<a id='L92' name='L92'></a><a id='L57' name='L57'></a> 57 <em class='brace'>}</em>;
<a id='L93' name='L93'></a><a id='L58' name='L58'></a> 58
<a id='L94' name='L94'></a><a id='L59' name='L59'></a> 59 <em class='comment'>/**</em>
<a id='L95' name='L95'></a><a id='L60' name='L60'></a> 60 <em class='comment'> * 命令表のサイズ</em>
<a id='L96' name='L96'></a><a id='L61' name='L61'></a> 61 <em class='comment'> */</em>
<a id='L97' name='L97'></a><a id='L62' name='L62'></a> 62 <strong class='reserved'>static</strong> <strong class='reserved'>int</strong> <a href='../Y/75.html' title='Multiple used in 2 places.'>comet2cmdsize</a> = <a href='../S/15097.html#L15' title='Defined at 15 in include/cmem.h.'>ARRAYSIZE</a>(<a href='../Y/74.html' title='Multiple used in 5 places.'>comet2cmd</a>);
<a id='L98' name='L98'></a><a id='L63' name='L63'></a> 63
<a id='L99' name='L99'></a><a id='L64' name='L64'></a> 64 <em class='comment'>/**</em>
<a id='L100' name='L100'></a><a id='L65' name='L65'></a> 65 <em class='comment'> * ハッシュ表のサイズ</em>
<a id='L101' name='L101'></a><a id='L66' name='L66'></a> 66 <em class='comment'> */</em>
<a id='L102' name='L102'></a><a id='L67' name='L67'></a> 67 <strong class='reserved'>enum</strong> <em class='brace'>{</em>
<a id='L103' name='L103'></a><a id='L68' name='L68'></a> 68 <a href='../R/16.html' title='Multiple referred from 4 places.'>CMDTABSIZE</a> = 41,
<a id='L104' name='L104'></a><a id='L69' name='L69'></a> 69 <em class='brace'>}</em>;
<a id='L105' name='L105'></a><a id='L70' name='L70'></a> 70
<a id='L106' name='L106'></a><a id='L71' name='L71'></a> 71 <em class='comment'>/**</em>
<a id='L107' name='L107'></a><a id='L72' name='L72'></a> 72 <em class='comment'> * ハッシュ表</em>
<a id='L108' name='L108'></a><a id='L73' name='L73'></a> 73 <em class='comment'> */</em>
<a id='L109' name='L109'></a><a id='L74' name='L74'></a> 74 <strong class='reserved'>static</strong> <a href='../S/15091.html#L128' title='Defined at 128 in include/struct.h.'>CMDTAB</a> *<a href='../Y/65.html' title='Multiple used in 9 places.'>cmdtab</a>[<a href='../S/15091.html#L66' title='Defined at 66 in include/struct.h.'>HASH_MAX</a>][<a href='../S/15541.html#L68' title='Defined at 68 in src/struct.c.'>CMDTABSIZE</a>] = <em class='brace'>{</em><em class='brace'>{</em><a href='../Y/4.html' title='Multiple used in 195 places.'>NULL</a><em class='brace'>}</em><em class='brace'>}</em>;
<a id='L110' name='L110'></a><a id='L75' name='L75'></a> 75
<a id='L111' name='L111'></a><a id='L76' name='L76'></a> 76 <em class='comment'>/**</em>
<a id='L112' name='L112'></a><a id='L77' name='L77'></a> 77 <em class='comment'> * 命令の名前とタイプからハッシュ値を生成する</em>
<a id='L113' name='L113'></a><a id='L78' name='L78'></a> 78 <em class='comment'> */</em>
<a id='L114' name='L114'></a><a id='L79' name='L79'></a> 79 <strong class='reserved'>unsigned</strong> <a href='../S/15541.html#L99' title='Defined at 99 in src/struct.c.'>hash_cmdtype</a>(<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/60.html' title='Multiple used in 87 places.'>cmd</a>, <a href='../S/15091.html#L102' title='Defined at 102 in include/struct.h.'>CMDTYPE</a> <a href='../Y/238.html' title='Multiple used in 26 places.'>type</a>);
<a id='L115' name='L115'></a><a id='L80' name='L80'></a> 80
<a id='L116' name='L116'></a><a id='L81' name='L81'></a> 81 <em class='comment'>/**</em>
<a id='L117' name='L117'></a><a id='L82' name='L82'></a> 82 <em class='comment'> * 命令コードからハッシュ値を生成する</em>
<a id='L118' name='L118'></a><a id='L83' name='L83'></a> 83 <em class='comment'> */</em>
<a id='L119' name='L119'></a><a id='L84' name='L84'></a> 84 <strong class='reserved'>unsigned</strong> <a href='../S/15541.html#L182' title='Defined at 182 in src/struct.c.'>hash_code</a>(<a href='../S/15098.html#L9' title='Defined at 9 in include/word.h.'>WORD</a> <a href='../Y/71.html' title='Multiple used in 25 places.'>code</a>);
<a id='L120' name='L120'></a><a id='L85' name='L85'></a> 85
<a id='L121' name='L121'></a><a id='L86' name='L86'></a> 86 <em class='comment'>/**</em>
<a id='L122' name='L122'></a><a id='L87' name='L87'></a> 87 <em class='comment'> * CPUのリセット</em>
<a id='L123' name='L123'></a><a id='L88' name='L88'></a> 88 <em class='comment'> */</em>
<a id='L124' name='L124'></a><a id='L89' name='L89'></a> 89 <strong class='reserved'>void</strong> <a href='../S/15541.html#L291' title='Defined at 291 in src/struct.c.'>cpu_reset</a>();
<a id='L125' name='L125'></a><a id='L90' name='L90'></a> 90
<a id='L126' name='L126'></a><a id='L91' name='L91'></a> 91 <em class='comment'>/**</em>
<a id='L127' name='L127'></a><a id='L92' name='L92'></a> 92 <em class='comment'> * メモリのリセット</em>
<a id='L128' name='L128'></a><a id='L93' name='L93'></a> 93 <em class='comment'> */</em>
<a id='L129' name='L129'></a><a id='L94' name='L94'></a> 94 <strong class='reserved'>void</strong> <a href='../S/15541.html#L304' title='Defined at 304 in src/struct.c.'>memory_reset</a>();
<a id='L130' name='L130'></a><a id='L95' name='L95'></a> 95
<a id='L131' name='L131'></a><a id='L96' name='L96'></a> 96 <em class='comment'>/**</em>
<a id='L132' name='L132'></a><a id='L97' name='L97'></a> 97 <em class='comment'> * 命令の名前とタイプからハッシュ値を生成する</em>
<a id='L133' name='L133'></a><a id='L98' name='L98'></a> 98 <em class='comment'> */</em>
<a id='L134' name='L134'></a><a id='L99' name='L99'></a> 99 <strong class='reserved'>unsigned</strong> <a href='../R/172.html' title='Multiple referred from 3 places.'>hash_cmdtype</a>(<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/60.html' title='Multiple used in 87 places.'>cmd</a>, <a href='../S/15091.html#L102' title='Defined at 102 in include/struct.h.'>CMDTYPE</a> <a href='../Y/238.html' title='Multiple used in 26 places.'>type</a>)
<a id='L135' name='L135'></a><a id='L100' name='L100'></a> 100 <em class='brace'>{</em>
<a id='L136' name='L136'></a><a id='L101' name='L101'></a> 101 <a href='../S/15099.html#L21' title='Defined at 21 in include/hash.h.'>HKEY</a> *<a href='../Y/126.html' title='Multiple used in 41 places.'>keys</a>[2] = <em class='brace'>{</em><a href='../Y/4.html' title='Multiple used in 195 places.'>NULL</a><em class='brace'>}</em>;
<a id='L137' name='L137'></a><a id='L102' name='L102'></a> 102 <strong class='reserved'>unsigned</strong> <a href='../Y/117.html' title='Multiple used in 12 places.'>hashval</a> = 0;
<a id='L138' name='L138'></a><a id='L103' name='L103'></a> 103
<a id='L139' name='L139'></a><a id='L104' name='L104'></a> 104 <em class='comment'>/* 命令名を設定 */</em>
<a id='L140' name='L140'></a><a id='L105' name='L105'></a> 105 <a href='../Y/126.html' title='Multiple used in 41 places.'>keys</a>[0] = <a href='../S/15523.html#L23' title='Defined at 23 in src/cmem.c.'>malloc_chk</a>(<strong class='reserved'>sizeof</strong>(<a href='../S/15099.html#L21' title='Defined at 21 in include/hash.h.'>HKEY</a>), "hash_cmdtype.keys[0]");
<a id='L141' name='L141'></a><a id='L106' name='L106'></a> 106 <a href='../Y/126.html' title='Multiple used in 41 places.'>keys</a>[0]-&gt;<a href='../Y/238.html' title='Multiple used in 26 places.'>type</a> = <a href='../S/15099.html#L8' title='Defined at 8 in include/hash.h.'>CHARS</a>;
<a id='L142' name='L142'></a><a id='L107' name='L107'></a> 107 <a href='../Y/126.html' title='Multiple used in 41 places.'>keys</a>[0]-&gt;<a href='../Y/240.html' title='Multiple used in 35 places.'>val</a>.<a href='../Y/194.html' title='Multiple used in 74 places.'>s</a> = <a href='../S/15523.html#L45' title='Defined at 45 in src/cmem.c.'>strdup_chk</a>(<a href='../Y/60.html' title='Multiple used in 87 places.'>cmd</a>, "keys[0].val.s");
<a id='L143' name='L143'></a><a id='L108' name='L108'></a> 108 <em class='comment'>/* 命令タイプを設定 */</em>
<a id='L144' name='L144'></a><a id='L109' name='L109'></a> 109 <a href='../Y/126.html' title='Multiple used in 41 places.'>keys</a>[1] = <a href='../S/15523.html#L23' title='Defined at 23 in src/cmem.c.'>malloc_chk</a>(<strong class='reserved'>sizeof</strong>(<a href='../S/15099.html#L21' title='Defined at 21 in include/hash.h.'>HKEY</a>), "hash_cmdtype.keys[1]");
<a id='L145' name='L145'></a><a id='L110' name='L110'></a> 110 <a href='../Y/126.html' title='Multiple used in 41 places.'>keys</a>[1]-&gt;<a href='../Y/238.html' title='Multiple used in 26 places.'>type</a> = <a href='../S/15099.html#L9' title='Defined at 9 in include/hash.h.'>INT</a>;
<a id='L146' name='L146'></a><a id='L111' name='L111'></a> 111 <a href='../Y/126.html' title='Multiple used in 41 places.'>keys</a>[1]-&gt;<a href='../Y/240.html' title='Multiple used in 35 places.'>val</a>.<a href='../Y/119.html' title='Multiple used in 230 places.'>i</a> = (<strong class='reserved'>int</strong>)(<a href='../Y/238.html' title='Multiple used in 26 places.'>type</a> &amp; 070);
<a id='L147' name='L147'></a><a id='L112' name='L112'></a> 112 <em class='comment'>/* ハッシュ値の計算 */</em>
<a id='L148' name='L148'></a><a id='L113' name='L113'></a> 113 <a href='../Y/117.html' title='Multiple used in 12 places.'>hashval</a> = <a href='../S/15522.html#L3' title='Defined at 3 in src/hash.c.'>hash</a>(2, <a href='../Y/126.html' title='Multiple used in 41 places.'>keys</a>, <a href='../S/15541.html#L68' title='Defined at 68 in src/struct.c.'>CMDTABSIZE</a>);
<a id='L149' name='L149'></a><a id='L114' name='L114'></a> 114 <a href='../S/15097.html#L22' title='Defined at 22 in include/cmem.h.'>FREE</a>(<a href='../Y/126.html' title='Multiple used in 41 places.'>keys</a>[0]-&gt;<a href='../Y/240.html' title='Multiple used in 35 places.'>val</a>.<a href='../Y/194.html' title='Multiple used in 74 places.'>s</a>);
<a id='L150' name='L150'></a><a id='L115' name='L115'></a> 115 <a href='../S/15097.html#L22' title='Defined at 22 in include/cmem.h.'>FREE</a>(<a href='../Y/126.html' title='Multiple used in 41 places.'>keys</a>[0]);
<a id='L151' name='L151'></a><a id='L116' name='L116'></a> 116 <a href='../S/15097.html#L22' title='Defined at 22 in include/cmem.h.'>FREE</a>(<a href='../Y/126.html' title='Multiple used in 41 places.'>keys</a>[1]);
<a id='L152' name='L152'></a><a id='L117' name='L117'></a> 117 <em class='comment'>/* ハッシュ値を返す */</em>
<a id='L153' name='L153'></a><a id='L118' name='L118'></a> 118 <strong class='reserved'>return</strong> <a href='../Y/117.html' title='Multiple used in 12 places.'>hashval</a>;
<a id='L154' name='L154'></a><a id='L119' name='L119'></a> 119 <em class='brace'>}</em>
<a id='L155' name='L155'></a><a id='L120' name='L120'></a> 120
<a id='L156' name='L156'></a><a id='L121' name='L121'></a> 121 <em class='comment'>/**</em>
<a id='L157' name='L157'></a><a id='L122' name='L122'></a> 122 <em class='comment'> * 命令ハッシュ表を作成する</em>
<a id='L158' name='L158'></a><a id='L123' name='L123'></a> 123 <em class='comment'> */</em>
<a id='L159' name='L159'></a><a id='L124' name='L124'></a> 124 <a href='../Y/27.html' title='Multiple used in 55 places.'>bool</a> <a href='../R/133.html' title='Multiple referred from 6 places.'>create_cmdtable</a>(<a href='../S/15091.html#L67' title='Defined at 67 in include/struct.h.'>CMDTAB_HASH</a> <a href='../S/15522.html#L3' title='Defined at 3 in src/hash.c.'>hash</a>)
<a id='L160' name='L160'></a><a id='L125' name='L125'></a> 125 <em class='brace'>{</em>
<a id='L161' name='L161'></a><a id='L126' name='L126'></a> 126 <a href='../S/15091.html#L128' title='Defined at 128 in include/struct.h.'>CMDTAB</a> *<a href='../Y/176.html' title='Multiple used in 127 places.'>p</a> = <a href='../Y/4.html' title='Multiple used in 195 places.'>NULL</a>;
<a id='L162' name='L162'></a><a id='L127' name='L127'></a> 127 <strong class='reserved'>unsigned</strong> <a href='../Y/117.html' title='Multiple used in 12 places.'>hashval</a>;
<a id='L163' name='L163'></a><a id='L128' name='L128'></a> 128
<a id='L164' name='L164'></a><a id='L129' name='L129'></a> 129 <strong class='reserved'>for</strong>(<strong class='reserved'>int</strong> <a href='../Y/119.html' title='Multiple used in 230 places.'>i</a> = 0; <a href='../Y/119.html' title='Multiple used in 230 places.'>i</a> &lt; <a href='../Y/75.html' title='Multiple used in 2 places.'>comet2cmdsize</a>; <a href='../Y/119.html' title='Multiple used in 230 places.'>i</a>++) <em class='brace'>{</em>
<a id='L165' name='L165'></a><a id='L130' name='L130'></a> 130 <a href='../Y/176.html' title='Multiple used in 127 places.'>p</a> = <a href='../S/15523.html#L23' title='Defined at 23 in src/cmem.c.'>malloc_chk</a>(<strong class='reserved'>sizeof</strong>(<a href='../S/15091.html#L128' title='Defined at 128 in include/struct.h.'>CMDTAB</a>), "create_cmdtable.p");
<a id='L166' name='L166'></a><a id='L131' name='L131'></a> 131 <a href='../Y/176.html' title='Multiple used in 127 places.'>p</a>-&gt;<a href='../Y/60.html' title='Multiple used in 87 places.'>cmd</a> = &amp;<a href='../Y/74.html' title='Multiple used in 5 places.'>comet2cmd</a>[<a href='../Y/119.html' title='Multiple used in 230 places.'>i</a>];
<a id='L167' name='L167'></a><a id='L132' name='L132'></a> 132 <strong class='reserved'>if</strong>(<a href='../S/15522.html#L3' title='Defined at 3 in src/hash.c.'>hash</a> == <a href='../S/15091.html#L64' title='Defined at 64 in include/struct.h.'>HASH_CMDTYPE</a>) <em class='brace'>{</em>
<a id='L168' name='L168'></a><a id='L133' name='L133'></a> 133 <a href='../Y/117.html' title='Multiple used in 12 places.'>hashval</a> = <a href='../S/15541.html#L99' title='Defined at 99 in src/struct.c.'>hash_cmdtype</a>(<a href='../Y/74.html' title='Multiple used in 5 places.'>comet2cmd</a>[<a href='../Y/119.html' title='Multiple used in 230 places.'>i</a>].<a href='../Y/158.html' title='Multiple used in 16 places.'>name</a>, <a href='../Y/74.html' title='Multiple used in 5 places.'>comet2cmd</a>[<a href='../Y/119.html' title='Multiple used in 230 places.'>i</a>].<a href='../Y/238.html' title='Multiple used in 26 places.'>type</a>);
<a id='L169' name='L169'></a><a id='L134' name='L134'></a> 134 <em class='brace'>}</em> <strong class='reserved'>else</strong> <strong class='reserved'>if</strong>(<a href='../S/15522.html#L3' title='Defined at 3 in src/hash.c.'>hash</a> == <a href='../S/15091.html#L65' title='Defined at 65 in include/struct.h.'>HASH_CODE</a>) <em class='brace'>{</em>
<a id='L170' name='L170'></a><a id='L135' name='L135'></a> 135 <a href='../Y/117.html' title='Multiple used in 12 places.'>hashval</a> = <a href='../S/15541.html#L182' title='Defined at 182 in src/struct.c.'>hash_code</a>(<a href='../Y/74.html' title='Multiple used in 5 places.'>comet2cmd</a>[<a href='../Y/119.html' title='Multiple used in 230 places.'>i</a>].<a href='../Y/71.html' title='Multiple used in 25 places.'>code</a>);
<a id='L171' name='L171'></a><a id='L136' name='L136'></a> 136 <em class='brace'>}</em>
<a id='L172' name='L172'></a><a id='L137' name='L137'></a> 137 <a href='../Y/176.html' title='Multiple used in 127 places.'>p</a>-&gt;<a href='../Y/159.html' title='Multiple used in 30 places.'>next</a> = <a href='../Y/65.html' title='Multiple used in 9 places.'>cmdtab</a>[<a href='../S/15522.html#L3' title='Defined at 3 in src/hash.c.'>hash</a>][<a href='../Y/117.html' title='Multiple used in 12 places.'>hashval</a>];
<a id='L173' name='L173'></a><a id='L138' name='L138'></a> 138 <a href='../Y/65.html' title='Multiple used in 9 places.'>cmdtab</a>[<a href='../S/15522.html#L3' title='Defined at 3 in src/hash.c.'>hash</a>][<a href='../Y/117.html' title='Multiple used in 12 places.'>hashval</a>] = <a href='../Y/176.html' title='Multiple used in 127 places.'>p</a>;
<a id='L174' name='L174'></a><a id='L139' name='L139'></a> 139 <em class='brace'>}</em>
<a id='L175' name='L175'></a><a id='L140' name='L140'></a> 140 <strong class='reserved'>return</strong> <a href='../Y/236.html' title='Multiple used in 79 places.'>true</a>;
<a id='L176' name='L176'></a><a id='L141' name='L141'></a> 141 <em class='brace'>}</em>
<a id='L177' name='L177'></a><a id='L142' name='L142'></a> 142
<a id='L178' name='L178'></a><a id='L143' name='L143'></a> 143 <em class='comment'>/**</em>
<a id='L179' name='L179'></a><a id='L144' name='L144'></a> 144 <em class='comment'> * 命令ハッシュ表を解放する</em>
<a id='L180' name='L180'></a><a id='L145' name='L145'></a> 145 <em class='comment'> */</em>
<a id='L181' name='L181'></a><a id='L146' name='L146'></a> 146 <strong class='reserved'>void</strong> <a href='../R/146.html' title='Multiple referred from 9 places.'>free_cmdtable</a>(<a href='../S/15091.html#L67' title='Defined at 67 in include/struct.h.'>CMDTAB_HASH</a> <a href='../S/15522.html#L3' title='Defined at 3 in src/hash.c.'>hash</a>)
<a id='L182' name='L182'></a><a id='L147' name='L147'></a> 147 <em class='brace'>{</em>
<a id='L183' name='L183'></a><a id='L148' name='L148'></a> 148 <a href='../S/15091.html#L128' title='Defined at 128 in include/struct.h.'>CMDTAB</a> *<a href='../Y/176.html' title='Multiple used in 127 places.'>p</a> = <a href='../Y/4.html' title='Multiple used in 195 places.'>NULL</a>;
<a id='L184' name='L184'></a><a id='L149' name='L149'></a> 149 <a href='../S/15091.html#L128' title='Defined at 128 in include/struct.h.'>CMDTAB</a> *<a href='../Y/186.html' title='Multiple used in 17 places.'>q</a> = <a href='../Y/4.html' title='Multiple used in 195 places.'>NULL</a>;
<a id='L185' name='L185'></a><a id='L150' name='L150'></a> 150
<a id='L186' name='L186'></a><a id='L151' name='L151'></a> 151 <strong class='reserved'>for</strong>(<strong class='reserved'>int</strong> <a href='../Y/119.html' title='Multiple used in 230 places.'>i</a> = 0; <a href='../Y/119.html' title='Multiple used in 230 places.'>i</a> &lt; <a href='../S/15541.html#L68' title='Defined at 68 in src/struct.c.'>CMDTABSIZE</a>; <a href='../Y/119.html' title='Multiple used in 230 places.'>i</a>++) <em class='brace'>{</em>
<a id='L187' name='L187'></a><a id='L152' name='L152'></a> 152 <strong class='reserved'>for</strong>(<a href='../Y/176.html' title='Multiple used in 127 places.'>p</a> = <a href='../Y/65.html' title='Multiple used in 9 places.'>cmdtab</a>[<a href='../S/15522.html#L3' title='Defined at 3 in src/hash.c.'>hash</a>][<a href='../Y/119.html' title='Multiple used in 230 places.'>i</a>]; <a href='../Y/176.html' title='Multiple used in 127 places.'>p</a> != <a href='../Y/4.html' title='Multiple used in 195 places.'>NULL</a>; <a href='../Y/176.html' title='Multiple used in 127 places.'>p</a> = <a href='../Y/186.html' title='Multiple used in 17 places.'>q</a>) <em class='brace'>{</em>
<a id='L188' name='L188'></a><a id='L153' name='L153'></a> 153 <a href='../Y/186.html' title='Multiple used in 17 places.'>q</a> = <a href='../Y/176.html' title='Multiple used in 127 places.'>p</a>-&gt;<a href='../Y/159.html' title='Multiple used in 30 places.'>next</a>;
<a id='L189' name='L189'></a><a id='L154' name='L154'></a> 154 <a href='../S/15097.html#L22' title='Defined at 22 in include/cmem.h.'>FREE</a>(<a href='../Y/176.html' title='Multiple used in 127 places.'>p</a>);
<a id='L190' name='L190'></a><a id='L155' name='L155'></a> 155 <em class='brace'>}</em>
<a id='L191' name='L191'></a><a id='L156' name='L156'></a> 156 <a href='../Y/65.html' title='Multiple used in 9 places.'>cmdtab</a>[<a href='../S/15522.html#L3' title='Defined at 3 in src/hash.c.'>hash</a>][<a href='../Y/119.html' title='Multiple used in 230 places.'>i</a>] = <a href='../Y/4.html' title='Multiple used in 195 places.'>NULL</a>;
<a id='L192' name='L192'></a><a id='L157' name='L157'></a> 157 <em class='brace'>}</em>
<a id='L193' name='L193'></a><a id='L158' name='L158'></a> 158 <em class='brace'>}</em>
<a id='L194' name='L194'></a><a id='L159' name='L159'></a> 159
<a id='L195' name='L195'></a><a id='L160' name='L160'></a> 160 <em class='comment'>/**</em>
<a id='L196' name='L196'></a><a id='L161' name='L161'></a> 161 <em class='comment'> * 命令の名前とタイプから、命令コードを返す\n</em>
<a id='L197' name='L197'></a><a id='L162' name='L162'></a> 162 <em class='comment'> * 無効な場合は0xFFFFを返す</em>
<a id='L198' name='L198'></a><a id='L163' name='L163'></a> 163 <em class='comment'> */</em>
<a id='L199' name='L199'></a><a id='L164' name='L164'></a> 164 <a href='../S/15098.html#L9' title='Defined at 9 in include/word.h.'>WORD</a> <a href='../R/160.html' title='Multiple referred from 7 places.'>getcmdcode</a>(<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/60.html' title='Multiple used in 87 places.'>cmd</a>, <a href='../S/15091.html#L102' title='Defined at 102 in include/struct.h.'>CMDTYPE</a> <a href='../Y/238.html' title='Multiple used in 26 places.'>type</a>)
<a id='L200' name='L200'></a><a id='L165' name='L165'></a> 165 <em class='brace'>{</em>
<a id='L201' name='L201'></a><a id='L166' name='L166'></a> 166 <a href='../S/15091.html#L128' title='Defined at 128 in include/struct.h.'>CMDTAB</a> *<a href='../Y/176.html' title='Multiple used in 127 places.'>p</a> = <a href='../Y/4.html' title='Multiple used in 195 places.'>NULL</a>;
<a id='L202' name='L202'></a><a id='L167' name='L167'></a> 167 <a href='../S/15098.html#L9' title='Defined at 9 in include/word.h.'>WORD</a> <a href='../Y/243.html' title='Multiple used in 107 places.'>w</a> = 0xFFFF;
<a id='L203' name='L203'></a><a id='L168' name='L168'></a> 168
<a id='L204' name='L204'></a><a id='L169' name='L169'></a> 169 <a href='../Y/22.html' title='Multiple used in 24 places.'>assert</a>(<a href='../Y/60.html' title='Multiple used in 87 places.'>cmd</a> != <a href='../Y/4.html' title='Multiple used in 195 places.'>NULL</a>);
<a id='L205' name='L205'></a><a id='L170' name='L170'></a> 170 <strong class='reserved'>for</strong>(<a href='../Y/176.html' title='Multiple used in 127 places.'>p</a> = <a href='../Y/65.html' title='Multiple used in 9 places.'>cmdtab</a>[<a href='../S/15091.html#L64' title='Defined at 64 in include/struct.h.'>HASH_CMDTYPE</a>][<a href='../S/15541.html#L99' title='Defined at 99 in src/struct.c.'>hash_cmdtype</a>(<a href='../Y/60.html' title='Multiple used in 87 places.'>cmd</a>, <a href='../Y/238.html' title='Multiple used in 26 places.'>type</a>)]; <a href='../Y/176.html' title='Multiple used in 127 places.'>p</a> != <a href='../Y/4.html' title='Multiple used in 195 places.'>NULL</a>; <a href='../Y/176.html' title='Multiple used in 127 places.'>p</a> = <a href='../Y/176.html' title='Multiple used in 127 places.'>p</a>-&gt;<a href='../Y/159.html' title='Multiple used in 30 places.'>next</a>) <em class='brace'>{</em>
<a id='L206' name='L206'></a><a id='L171' name='L171'></a> 171 <strong class='reserved'>if</strong>(<a href='../Y/214.html' title='Multiple used in 5 places.'>strcmp</a>(<a href='../Y/60.html' title='Multiple used in 87 places.'>cmd</a>, <a href='../Y/176.html' title='Multiple used in 127 places.'>p</a>-&gt;<a href='../Y/60.html' title='Multiple used in 87 places.'>cmd</a>-&gt;<a href='../Y/158.html' title='Multiple used in 16 places.'>name</a>) == 0 &amp;&amp; <a href='../Y/238.html' title='Multiple used in 26 places.'>type</a> == <a href='../Y/176.html' title='Multiple used in 127 places.'>p</a>-&gt;<a href='../Y/60.html' title='Multiple used in 87 places.'>cmd</a>-&gt;<a href='../Y/238.html' title='Multiple used in 26 places.'>type</a>) <em class='brace'>{</em>
<a id='L207' name='L207'></a><a id='L172' name='L172'></a> 172 <a href='../Y/243.html' title='Multiple used in 107 places.'>w</a> = <a href='../Y/176.html' title='Multiple used in 127 places.'>p</a>-&gt;<a href='../Y/60.html' title='Multiple used in 87 places.'>cmd</a>-&gt;<a href='../Y/71.html' title='Multiple used in 25 places.'>code</a>;
<a id='L208' name='L208'></a><a id='L173' name='L173'></a> 173 <strong class='reserved'>break</strong>;
<a id='L209' name='L209'></a><a id='L174' name='L174'></a> 174 <em class='brace'>}</em>
<a id='L210' name='L210'></a><a id='L175' name='L175'></a> 175 <em class='brace'>}</em>
<a id='L211' name='L211'></a><a id='L176' name='L176'></a> 176 <strong class='reserved'>return</strong> <a href='../Y/243.html' title='Multiple used in 107 places.'>w</a>;
<a id='L212' name='L212'></a><a id='L177' name='L177'></a> 177 <em class='brace'>}</em>
<a id='L213' name='L213'></a><a id='L178' name='L178'></a> 178
<a id='L214' name='L214'></a><a id='L179' name='L179'></a> 179 <em class='comment'>/**</em>
<a id='L215' name='L215'></a><a id='L180' name='L180'></a> 180 <em class='comment'> * 命令コードからハッシュ値を生成する</em>
<a id='L216' name='L216'></a><a id='L181' name='L181'></a> 181 <em class='comment'> */</em>
<a id='L217' name='L217'></a><a id='L182' name='L182'></a> 182 <strong class='reserved'>unsigned</strong> <a href='../R/173.html' title='Multiple referred from 5 places.'>hash_code</a>(<a href='../S/15098.html#L9' title='Defined at 9 in include/word.h.'>WORD</a> <a href='../Y/71.html' title='Multiple used in 25 places.'>code</a>)
<a id='L218' name='L218'></a><a id='L183' name='L183'></a> 183 <em class='brace'>{</em>
<a id='L219' name='L219'></a><a id='L184' name='L184'></a> 184 <a href='../S/15099.html#L21' title='Defined at 21 in include/hash.h.'>HKEY</a> *<a href='../Y/126.html' title='Multiple used in 41 places.'>keys</a>[1] = <em class='brace'>{</em><a href='../Y/4.html' title='Multiple used in 195 places.'>NULL</a><em class='brace'>}</em>;
<a id='L220' name='L220'></a><a id='L185' name='L185'></a> 185 <strong class='reserved'>unsigned</strong> <a href='../Y/116.html' title='Multiple used in 19 places.'>h</a> = 0;
<a id='L221' name='L221'></a><a id='L186' name='L186'></a> 186
<a id='L222' name='L222'></a><a id='L187' name='L187'></a> 187 <em class='comment'>/* 命令コードを設定 */</em>
<a id='L223' name='L223'></a><a id='L188' name='L188'></a> 188 <a href='../Y/126.html' title='Multiple used in 41 places.'>keys</a>[0] = <a href='../S/15523.html#L23' title='Defined at 23 in src/cmem.c.'>malloc_chk</a>(<strong class='reserved'>sizeof</strong>(<a href='../S/15099.html#L21' title='Defined at 21 in include/hash.h.'>HKEY</a>), "hash_code.key");
<a id='L224' name='L224'></a><a id='L189' name='L189'></a> 189 <a href='../Y/126.html' title='Multiple used in 41 places.'>keys</a>[0]-&gt;<a href='../Y/238.html' title='Multiple used in 26 places.'>type</a> = <a href='../S/15099.html#L9' title='Defined at 9 in include/hash.h.'>INT</a>;
<a id='L225' name='L225'></a><a id='L190' name='L190'></a> 190 <a href='../Y/126.html' title='Multiple used in 41 places.'>keys</a>[0]-&gt;<a href='../Y/240.html' title='Multiple used in 35 places.'>val</a>.<a href='../Y/119.html' title='Multiple used in 230 places.'>i</a> = (<strong class='reserved'>int</strong>)(<a href='../Y/71.html' title='Multiple used in 25 places.'>code</a> &gt;&gt; 8);
<a id='L226' name='L226'></a><a id='L191' name='L191'></a> 191 <a href='../Y/116.html' title='Multiple used in 19 places.'>h</a> = <a href='../S/15522.html#L3' title='Defined at 3 in src/hash.c.'>hash</a>(1, <a href='../Y/126.html' title='Multiple used in 41 places.'>keys</a>, <a href='../S/15541.html#L68' title='Defined at 68 in src/struct.c.'>CMDTABSIZE</a>);
<a id='L227' name='L227'></a><a id='L192' name='L192'></a> 192 <a href='../S/15097.html#L22' title='Defined at 22 in include/cmem.h.'>FREE</a>(<a href='../Y/126.html' title='Multiple used in 41 places.'>keys</a>[0]);
<a id='L228' name='L228'></a><a id='L193' name='L193'></a> 193 <strong class='reserved'>return</strong> <a href='../Y/116.html' title='Multiple used in 19 places.'>h</a>;
<a id='L229' name='L229'></a><a id='L194' name='L194'></a> 194 <em class='brace'>}</em>
<a id='L230' name='L230'></a><a id='L195' name='L195'></a> 195
<a id='L231' name='L231'></a><a id='L196' name='L196'></a> 196 <em class='comment'>/**</em>
<a id='L232' name='L232'></a><a id='L197' name='L197'></a> 197 <em class='comment'> * 命令コードから命令の関数ポインタを返す</em>
<a id='L233' name='L233'></a><a id='L198' name='L198'></a> 198 <em class='comment'> */</em>
<a id='L234' name='L234'></a><a id='L199' name='L199'></a> 199 <strong class='reserved'>const</strong> <strong class='reserved'>void</strong> (*<a href='../R/162.html' title='Multiple referred from 2 places.'>getcmdptr</a>(<a href='../S/15098.html#L9' title='Defined at 9 in include/word.h.'>WORD</a> <a href='../Y/71.html' title='Multiple used in 25 places.'>code</a>))
<a id='L235' name='L235'></a><a id='L200' name='L200'></a> 200 <em class='brace'>{</em>
<a id='L236' name='L236'></a><a id='L201' name='L201'></a> 201 <a href='../S/15091.html#L128' title='Defined at 128 in include/struct.h.'>CMDTAB</a> *<a href='../Y/226.html' title='Multiple used in 30 places.'>t</a> = <a href='../Y/4.html' title='Multiple used in 195 places.'>NULL</a>;
<a id='L237' name='L237'></a><a id='L202' name='L202'></a> 202 <strong class='reserved'>const</strong> <strong class='reserved'>void</strong> *<a href='../Y/183.html' title='Multiple used in 24 places.'>ptr</a> = <a href='../Y/4.html' title='Multiple used in 195 places.'>NULL</a>;
<a id='L238' name='L238'></a><a id='L203' name='L203'></a> 203
<a id='L239' name='L239'></a><a id='L204' name='L204'></a> 204 <strong class='reserved'>for</strong>(<a href='../Y/226.html' title='Multiple used in 30 places.'>t</a> = <a href='../Y/65.html' title='Multiple used in 9 places.'>cmdtab</a>[<a href='../S/15091.html#L65' title='Defined at 65 in include/struct.h.'>HASH_CODE</a>][<a href='../S/15541.html#L182' title='Defined at 182 in src/struct.c.'>hash_code</a>(<a href='../Y/71.html' title='Multiple used in 25 places.'>code</a>)]; <a href='../Y/226.html' title='Multiple used in 30 places.'>t</a> != <a href='../Y/4.html' title='Multiple used in 195 places.'>NULL</a>; <a href='../Y/226.html' title='Multiple used in 30 places.'>t</a> = <a href='../Y/226.html' title='Multiple used in 30 places.'>t</a>-&gt;<a href='../Y/159.html' title='Multiple used in 30 places.'>next</a>) <em class='brace'>{</em>
<a id='L240' name='L240'></a><a id='L205' name='L205'></a> 205 <strong class='reserved'>if</strong>(<a href='../Y/71.html' title='Multiple used in 25 places.'>code</a> == <a href='../Y/226.html' title='Multiple used in 30 places.'>t</a>-&gt;<a href='../Y/60.html' title='Multiple used in 87 places.'>cmd</a>-&gt;<a href='../Y/71.html' title='Multiple used in 25 places.'>code</a>) <em class='brace'>{</em>
<a id='L241' name='L241'></a><a id='L206' name='L206'></a> 206 <a href='../Y/183.html' title='Multiple used in 24 places.'>ptr</a> = <a href='../Y/226.html' title='Multiple used in 30 places.'>t</a>-&gt;<a href='../Y/60.html' title='Multiple used in 87 places.'>cmd</a>-&gt;<a href='../Y/183.html' title='Multiple used in 24 places.'>ptr</a>;
<a id='L242' name='L242'></a><a id='L207' name='L207'></a> 207 <strong class='reserved'>break</strong>;
<a id='L243' name='L243'></a><a id='L208' name='L208'></a> 208 <em class='brace'>}</em>
<a id='L244' name='L244'></a><a id='L209' name='L209'></a> 209 <em class='brace'>}</em>
<a id='L245' name='L245'></a><a id='L210' name='L210'></a> 210 <strong class='reserved'>return</strong> <a href='../Y/183.html' title='Multiple used in 24 places.'>ptr</a>;
<a id='L246' name='L246'></a><a id='L211' name='L211'></a> 211 <em class='brace'>}</em>
<a id='L247' name='L247'></a><a id='L212' name='L212'></a> 212
<a id='L248' name='L248'></a><a id='L213' name='L213'></a> 213 <em class='comment'>/**</em>
<a id='L249' name='L249'></a><a id='L214' name='L214'></a> 214 <em class='comment'> * 命令コードから命令のタイプを返す</em>
<a id='L250' name='L250'></a><a id='L215' name='L215'></a> 215 <em class='comment'> */</em>
<a id='L251' name='L251'></a><a id='L216' name='L216'></a> 216 <a href='../S/15091.html#L102' title='Defined at 102 in include/struct.h.'>CMDTYPE</a> <a href='../R/163.html' title='Multiple referred from 3 places.'>getcmdtype</a>(<a href='../S/15098.html#L9' title='Defined at 9 in include/word.h.'>WORD</a> <a href='../Y/71.html' title='Multiple used in 25 places.'>code</a>)
<a id='L252' name='L252'></a><a id='L217' name='L217'></a> 217 <em class='brace'>{</em>
<a id='L253' name='L253'></a><a id='L218' name='L218'></a> 218 <a href='../S/15091.html#L128' title='Defined at 128 in include/struct.h.'>CMDTAB</a> *<a href='../Y/226.html' title='Multiple used in 30 places.'>t</a> = <a href='../Y/4.html' title='Multiple used in 195 places.'>NULL</a>;
<a id='L254' name='L254'></a><a id='L219' name='L219'></a> 219 <a href='../S/15091.html#L102' title='Defined at 102 in include/struct.h.'>CMDTYPE</a> <a href='../Y/238.html' title='Multiple used in 26 places.'>type</a> = <a href='../S/15091.html#L101' title='Defined at 101 in include/struct.h.'>NONE</a>;
<a id='L255' name='L255'></a><a id='L220' name='L220'></a> 220
<a id='L256' name='L256'></a><a id='L221' name='L221'></a> 221 <strong class='reserved'>for</strong>(<a href='../Y/226.html' title='Multiple used in 30 places.'>t</a> = <a href='../Y/65.html' title='Multiple used in 9 places.'>cmdtab</a>[<a href='../S/15091.html#L65' title='Defined at 65 in include/struct.h.'>HASH_CODE</a>][<a href='../S/15541.html#L182' title='Defined at 182 in src/struct.c.'>hash_code</a>(<a href='../Y/71.html' title='Multiple used in 25 places.'>code</a>)]; <a href='../Y/226.html' title='Multiple used in 30 places.'>t</a> != <a href='../Y/4.html' title='Multiple used in 195 places.'>NULL</a>; <a href='../Y/226.html' title='Multiple used in 30 places.'>t</a> = <a href='../Y/226.html' title='Multiple used in 30 places.'>t</a>-&gt;<a href='../Y/159.html' title='Multiple used in 30 places.'>next</a>) <em class='brace'>{</em>
<a id='L257' name='L257'></a><a id='L222' name='L222'></a> 222 <strong class='reserved'>if</strong>(<a href='../Y/71.html' title='Multiple used in 25 places.'>code</a> == <a href='../Y/226.html' title='Multiple used in 30 places.'>t</a>-&gt;<a href='../Y/60.html' title='Multiple used in 87 places.'>cmd</a>-&gt;<a href='../Y/71.html' title='Multiple used in 25 places.'>code</a>) <em class='brace'>{</em>
<a id='L258' name='L258'></a><a id='L223' name='L223'></a> 223 <a href='../Y/238.html' title='Multiple used in 26 places.'>type</a> = <a href='../Y/226.html' title='Multiple used in 30 places.'>t</a>-&gt;<a href='../Y/60.html' title='Multiple used in 87 places.'>cmd</a>-&gt;<a href='../Y/238.html' title='Multiple used in 26 places.'>type</a>;
<a id='L259' name='L259'></a><a id='L224' name='L224'></a> 224 <strong class='reserved'>break</strong>;
<a id='L260' name='L260'></a><a id='L225' name='L225'></a> 225 <em class='brace'>}</em>
<a id='L261' name='L261'></a><a id='L226' name='L226'></a> 226 <em class='brace'>}</em>
<a id='L262' name='L262'></a><a id='L227' name='L227'></a> 227 <strong class='reserved'>return</strong> <a href='../Y/238.html' title='Multiple used in 26 places.'>type</a>;
<a id='L263' name='L263'></a><a id='L228' name='L228'></a> 228 <em class='brace'>}</em>
<a id='L264' name='L264'></a><a id='L229' name='L229'></a> 229
<a id='L265' name='L265'></a><a id='L230' name='L230'></a> 230 <em class='comment'>/**</em>
<a id='L266' name='L266'></a><a id='L231' name='L231'></a> 231 <em class='comment'> * 命令コードから命令の名前を返す</em>
<a id='L267' name='L267'></a><a id='L232' name='L232'></a> 232 <em class='comment'> */</em>
<a id='L268' name='L268'></a><a id='L233' name='L233'></a> 233 <strong class='reserved'>char</strong> *<a href='../R/161.html' title='Multiple referred from 3 places.'>getcmdname</a>(<a href='../S/15098.html#L9' title='Defined at 9 in include/word.h.'>WORD</a> <a href='../Y/71.html' title='Multiple used in 25 places.'>code</a>)
<a id='L269' name='L269'></a><a id='L234' name='L234'></a> 234 <em class='brace'>{</em>
<a id='L270' name='L270'></a><a id='L235' name='L235'></a> 235 <a href='../S/15091.html#L128' title='Defined at 128 in include/struct.h.'>CMDTAB</a> *<a href='../Y/226.html' title='Multiple used in 30 places.'>t</a> = <a href='../Y/4.html' title='Multiple used in 195 places.'>NULL</a>;
<a id='L271' name='L271'></a><a id='L236' name='L236'></a> 236 <strong class='reserved'>char</strong> *<a href='../Y/60.html' title='Multiple used in 87 places.'>cmd</a> = <a href='../Y/4.html' title='Multiple used in 195 places.'>NULL</a>;
<a id='L272' name='L272'></a><a id='L237' name='L237'></a> 237
<a id='L273' name='L273'></a><a id='L238' name='L238'></a> 238 <strong class='reserved'>for</strong>(<a href='../Y/226.html' title='Multiple used in 30 places.'>t</a> = <a href='../Y/65.html' title='Multiple used in 9 places.'>cmdtab</a>[<a href='../S/15091.html#L65' title='Defined at 65 in include/struct.h.'>HASH_CODE</a>][<a href='../S/15541.html#L182' title='Defined at 182 in src/struct.c.'>hash_code</a>(<a href='../Y/71.html' title='Multiple used in 25 places.'>code</a>)]; <a href='../Y/226.html' title='Multiple used in 30 places.'>t</a> != <a href='../Y/4.html' title='Multiple used in 195 places.'>NULL</a>; <a href='../Y/226.html' title='Multiple used in 30 places.'>t</a> = <a href='../Y/226.html' title='Multiple used in 30 places.'>t</a>-&gt;<a href='../Y/159.html' title='Multiple used in 30 places.'>next</a>) <em class='brace'>{</em>
<a id='L274' name='L274'></a><a id='L239' name='L239'></a> 239 <strong class='reserved'>if</strong>(<a href='../Y/71.html' title='Multiple used in 25 places.'>code</a> == <a href='../Y/226.html' title='Multiple used in 30 places.'>t</a>-&gt;<a href='../Y/60.html' title='Multiple used in 87 places.'>cmd</a>-&gt;<a href='../Y/71.html' title='Multiple used in 25 places.'>code</a>) <em class='brace'>{</em>
<a id='L275' name='L275'></a><a id='L240' name='L240'></a> 240 <a href='../Y/60.html' title='Multiple used in 87 places.'>cmd</a> = <a href='../Y/226.html' title='Multiple used in 30 places.'>t</a>-&gt;<a href='../Y/60.html' title='Multiple used in 87 places.'>cmd</a>-&gt;<a href='../Y/158.html' title='Multiple used in 16 places.'>name</a>;
<a id='L276' name='L276'></a><a id='L241' name='L241'></a> 241 <strong class='reserved'>break</strong>;
<a id='L277' name='L277'></a><a id='L242' name='L242'></a> 242 <em class='brace'>}</em>
<a id='L278' name='L278'></a><a id='L243' name='L243'></a> 243 <em class='brace'>}</em>
<a id='L279' name='L279'></a><a id='L244' name='L244'></a> 244 <strong class='reserved'>return</strong> <a href='../Y/60.html' title='Multiple used in 87 places.'>cmd</a>;
<a id='L280' name='L280'></a><a id='L245' name='L245'></a> 245 <em class='brace'>}</em>
<a id='L281' name='L281'></a><a id='L246' name='L246'></a> 246
<a id='L282' name='L282'></a><a id='L247' name='L247'></a> 247 <em class='comment'>/**</em>
<a id='L283' name='L283'></a><a id='L248' name='L248'></a> 248 <em class='comment'> * 汎用レジスタの番号からレジスタを表す文字列を返す</em>
<a id='L284' name='L284'></a><a id='L249' name='L249'></a> 249 <em class='comment'> */</em>
<a id='L285' name='L285'></a><a id='L250' name='L250'></a> 250
<a id='L286' name='L286'></a><a id='L251' name='L251'></a> 251 <strong class='reserved'>char</strong> *<a href='../R/166.html' title='Multiple referred from 6 places.'>grstr</a>(<a href='../S/15098.html#L9' title='Defined at 9 in include/word.h.'>WORD</a> <a href='../Y/245.html' title='Multiple used in 54 places.'>word</a>)
<a id='L287' name='L287'></a><a id='L252' name='L252'></a> 252 <em class='brace'>{</em>
<a id='L288' name='L288'></a><a id='L253' name='L253'></a> 253 <a href='../Y/22.html' title='Multiple used in 24 places.'>assert</a>(<a href='../Y/245.html' title='Multiple used in 54 places.'>word</a> &lt;= 7);
<a id='L289' name='L289'></a><a id='L254' name='L254'></a> 254 <strong class='reserved'>char</strong> *<a href='../Y/210.html' title='Multiple used in 116 places.'>str</a> = <a href='../Y/4.html' title='Multiple used in 195 places.'>NULL</a>;
<a id='L290' name='L290'></a><a id='L255' name='L255'></a> 255
<a id='L291' name='L291'></a><a id='L256' name='L256'></a> 256 <a href='../Y/210.html' title='Multiple used in 116 places.'>str</a> = <a href='../S/15523.html#L23' title='Defined at 23 in src/cmem.c.'>malloc_chk</a>(3 + 1, "grstr.str");
<a id='L292' name='L292'></a><a id='L257' name='L257'></a> 257 <a href='../Y/201.html' title='Multiple used in 9 places.'>sprintf</a>(<a href='../Y/210.html' title='Multiple used in 116 places.'>str</a>, "GR%d", <a href='../Y/245.html' title='Multiple used in 54 places.'>word</a>);
<a id='L293' name='L293'></a><a id='L258' name='L258'></a> 258 <strong class='reserved'>return</strong> <a href='../Y/210.html' title='Multiple used in 116 places.'>str</a>;
<a id='L294' name='L294'></a><a id='L259' name='L259'></a> 259 <em class='brace'>}</em>
<a id='L295' name='L295'></a><a id='L260' name='L260'></a> 260
<a id='L296' name='L296'></a><a id='L261' name='L261'></a> 261 <a href='../S/15098.html#L9' title='Defined at 9 in include/word.h.'>WORD</a> <a href='../R/191.html' title='Multiple referred from 4 places.'>memsize_str2word</a>(<strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../Y/210.html' title='Multiple used in 116 places.'>str</a>) <em class='brace'>{</em>
<a id='L297' name='L297'></a><a id='L262' name='L262'></a> 262 <strong class='reserved'>return</strong> (<a href='../S/15098.html#L9' title='Defined at 9 in include/word.h.'>WORD</a>)<a href='../S/15523.html#L3' title='Defined at 3 in src/cmem.c.'>str2l_range</a>(<a href='../Y/210.html' title='Multiple used in 116 places.'>str</a>, 1, <a href='../S/15091.html#L20' title='Defined at 20 in include/struct.h.'>MAX_MEMSIZE</a>, "Memory Size");
<a id='L298' name='L298'></a><a id='L263' name='L263'></a> 263 <em class='brace'>}</em>
<a id='L299' name='L299'></a><a id='L264' name='L264'></a> 264
<a id='L300' name='L300'></a><a id='L265' name='L265'></a> 265 <em class='comment'>/**</em>
<a id='L301' name='L301'></a><a id='L266' name='L266'></a> 266 <em class='comment'> * COMET II仮想マシンの初期化</em>
<a id='L302' name='L302'></a><a id='L267' name='L267'></a> 267 <em class='comment'> */</em>
<a id='L303' name='L303'></a><a id='L268' name='L268'></a> 268 <strong class='reserved'>void</strong> <a href='../R/121.html' title='Multiple referred from 4 places.'>comet2_init</a>(<a href='../S/15098.html#L9' title='Defined at 9 in include/word.h.'>WORD</a> <a href='../Y/150.html' title='Multiple used in 31 places.'>memsize</a>, <a href='../S/15091.html#L12' title='Defined at 12 in include/struct.h.'>CLOCK</a> <a href='../Y/59.html' title='Multiple used in 15 places.'>clocks</a>)
<a id='L304' name='L304'></a><a id='L269' name='L269'></a> 269 <em class='brace'>{</em>
<a id='L305' name='L305'></a><a id='L270' name='L270'></a> 270 <a href='../Y/224.html' title='Multiple used in 243 places.'>sys</a> = <a href='../S/15523.html#L23' title='Defined at 23 in src/cmem.c.'>malloc_chk</a>(<strong class='reserved'>sizeof</strong>(<a href='../S/15091.html#L53' title='Defined at 53 in include/struct.h.'>SYSTEM</a>), "sys");
<a id='L306' name='L306'></a><a id='L271' name='L271'></a> 271 <em class='comment'>/* メモリサイズを設定 */</em>
<a id='L307' name='L307'></a><a id='L272' name='L272'></a> 272 <a href='../Y/22.html' title='Multiple used in 24 places.'>assert</a>(0 &lt; <a href='../Y/150.html' title='Multiple used in 31 places.'>memsize</a> &amp;&amp; <a href='../Y/150.html' title='Multiple used in 31 places.'>memsize</a> &lt;= <a href='../S/15091.html#L20' title='Defined at 20 in include/struct.h.'>MAX_MEMSIZE</a>-1);
<a id='L308' name='L308'></a><a id='L273' name='L273'></a> 273 <a href='../Y/224.html' title='Multiple used in 243 places.'>sys</a>-&gt;<a href='../Y/150.html' title='Multiple used in 31 places.'>memsize</a> = <a href='../Y/150.html' title='Multiple used in 31 places.'>memsize</a>;
<a id='L309' name='L309'></a><a id='L274' name='L274'></a> 274 <em class='comment'>/* クロック周波数を設定 */</em>
<a id='L310' name='L310'></a><a id='L275' name='L275'></a> 275 <a href='../Y/22.html' title='Multiple used in 24 places.'>assert</a>(0 &lt; <a href='../Y/59.html' title='Multiple used in 15 places.'>clocks</a> &amp;&amp; <a href='../Y/59.html' title='Multiple used in 15 places.'>clocks</a> &lt;= <a href='../S/15091.html#L22' title='Defined at 22 in include/struct.h.'>MAX_CLOCKS</a>);
<a id='L311' name='L311'></a><a id='L276' name='L276'></a> 276 <a href='../Y/224.html' title='Multiple used in 243 places.'>sys</a>-&gt;<a href='../Y/59.html' title='Multiple used in 15 places.'>clocks</a> = <a href='../Y/59.html' title='Multiple used in 15 places.'>clocks</a>;
<a id='L312' name='L312'></a><a id='L277' name='L277'></a> 277 <em class='comment'>/* CPU領域の確保 */</em>
<a id='L313' name='L313'></a><a id='L278' name='L278'></a> 278 <a href='../Y/224.html' title='Multiple used in 243 places.'>sys</a>-&gt;<a href='../Y/78.html' title='Multiple used in 218 places.'>cpu</a> = <a href='../S/15523.html#L23' title='Defined at 23 in src/cmem.c.'>malloc_chk</a>(<strong class='reserved'>sizeof</strong>(<a href='../S/15091.html#L43' title='Defined at 43 in include/struct.h.'>CPU</a>), "comet2_init.cpu");
<a id='L314' name='L314'></a><a id='L279' name='L279'></a> 279 <em class='comment'>/* CPUをリセット */</em>
<a id='L315' name='L315'></a><a id='L280' name='L280'></a> 280 <a href='../S/15541.html#L291' title='Defined at 291 in src/struct.c.'>cpu_reset</a>();
<a id='L316' name='L316'></a><a id='L281' name='L281'></a> 281 <em class='comment'>/* メモリ領域の確保 */</em>
<a id='L317' name='L317'></a><a id='L282' name='L282'></a> 282 <a href='../Y/224.html' title='Multiple used in 243 places.'>sys</a>-&gt;<a href='../Y/148.html' title='Multiple used in 61 places.'>memory</a> = <a href='../S/15523.html#L34' title='Defined at 34 in src/cmem.c.'>calloc_chk</a>(<a href='../Y/224.html' title='Multiple used in 243 places.'>sys</a>-&gt;<a href='../Y/150.html' title='Multiple used in 31 places.'>memsize</a>, <strong class='reserved'>sizeof</strong>(<a href='../S/15098.html#L9' title='Defined at 9 in include/word.h.'>WORD</a>), "comet2_init.memory");
<a id='L318' name='L318'></a><a id='L283' name='L283'></a> 283 <em class='comment'>/* メモリをリセット */</em>
<a id='L319' name='L319'></a><a id='L284' name='L284'></a> 284 <a href='../S/15541.html#L304' title='Defined at 304 in src/struct.c.'>memory_reset</a>();
<a id='L320' name='L320'></a><a id='L285' name='L285'></a> 285 <em class='comment'>/* CASL2プログラムの開始と終了のアドレスを初期化 */</em>
<a id='L321' name='L321'></a><a id='L286' name='L286'></a> 286 <a href='../Y/91.html' title='Multiple used in 25 places.'>execptr</a> = <a href='../S/15523.html#L23' title='Defined at 23 in src/cmem.c.'>malloc_chk</a>(<strong class='reserved'>sizeof</strong>(<a href='../S/15091.html#L137' title='Defined at 137 in include/struct.h.'>EXECPTR</a>), "execptr");
<a id='L322' name='L322'></a><a id='L287' name='L287'></a> 287 <a href='../Y/91.html' title='Multiple used in 25 places.'>execptr</a>-&gt;<a href='../Y/209.html' title='Multiple used in 5 places.'>stop</a> = <a href='../Y/94.html' title='Multiple used in 52 places.'>false</a>;
<a id='L323' name='L323'></a><a id='L288' name='L288'></a> 288 <em class='brace'>}</em>
<a id='L324' name='L324'></a><a id='L289' name='L289'></a> 289
<a id='L325' name='L325'></a><a id='L290' name='L290'></a> 290
<a id='L326' name='L326'></a><a id='L291' name='L291'></a> 291 <strong class='reserved'>void</strong> <a href='../R/132.html' title='Multiple referred from 4 places.'>cpu_reset</a>() <em class='brace'>{</em>
<a id='L327' name='L327'></a><a id='L292' name='L292'></a> 292 <em class='comment'>/* 汎用レジスタ */</em>
<a id='L328' name='L328'></a><a id='L293' name='L293'></a> 293 <strong class='reserved'>for</strong>(<strong class='reserved'>int</strong> <a href='../Y/119.html' title='Multiple used in 230 places.'>i</a> = 0; <a href='../Y/119.html' title='Multiple used in 230 places.'>i</a> &lt; <a href='../S/15091.html#L19' title='Defined at 19 in include/struct.h.'>GRSIZE</a>; <a href='../Y/119.html' title='Multiple used in 230 places.'>i</a>++) <em class='brace'>{</em>
<a id='L329' name='L329'></a><a id='L294' name='L294'></a> 294 <a href='../Y/224.html' title='Multiple used in 243 places.'>sys</a>-&gt;<a href='../Y/78.html' title='Multiple used in 218 places.'>cpu</a>-&gt;<a href='../Y/115.html' title='Multiple used in 59 places.'>gr</a>[<a href='../Y/119.html' title='Multiple used in 230 places.'>i</a>] = 0x0;
<a id='L330' name='L330'></a><a id='L295' name='L295'></a> 295 <em class='brace'>}</em>
<a id='L331' name='L331'></a><a id='L296' name='L296'></a> 296 <a href='../Y/224.html' title='Multiple used in 243 places.'>sys</a>-&gt;<a href='../Y/78.html' title='Multiple used in 218 places.'>cpu</a>-&gt;<a href='../Y/200.html' title='Multiple used in 17 places.'>sp</a> = <a href='../Y/224.html' title='Multiple used in 243 places.'>sys</a>-&gt;<a href='../Y/150.html' title='Multiple used in 31 places.'>memsize</a>; <em class='comment'>/* スタックポインタ */</em>
<a id='L332' name='L332'></a><a id='L297' name='L297'></a> 297 <a href='../Y/224.html' title='Multiple used in 243 places.'>sys</a>-&gt;<a href='../Y/78.html' title='Multiple used in 218 places.'>cpu</a>-&gt;<a href='../Y/179.html' title='Multiple used in 110 places.'>pr</a> = 0x0; <em class='comment'>/* プログラムレジスタ */</em>
<a id='L333' name='L333'></a><a id='L298' name='L298'></a> 298 <a href='../Y/224.html' title='Multiple used in 243 places.'>sys</a>-&gt;<a href='../Y/78.html' title='Multiple used in 218 places.'>cpu</a>-&gt;<a href='../Y/105.html' title='Multiple used in 44 places.'>fr</a> = 0x0; <em class='comment'>/* フラグレジスタ */</em>
<a id='L334' name='L334'></a><a id='L299' name='L299'></a> 299 <em class='brace'>}</em>
<a id='L335' name='L335'></a><a id='L300' name='L300'></a> 300
<a id='L336' name='L336'></a><a id='L301' name='L301'></a> 301 <em class='comment'>/**</em>
<a id='L337' name='L337'></a><a id='L302' name='L302'></a> 302 <em class='comment'> * メモリのリセット</em>
<a id='L338' name='L338'></a><a id='L303' name='L303'></a> 303 <em class='comment'> */</em>
<a id='L339' name='L339'></a><a id='L304' name='L304'></a> 304 <strong class='reserved'>void</strong> <a href='../R/190.html' title='Multiple referred from 3 places.'>memory_reset</a>() <em class='brace'>{</em>
<a id='L340' name='L340'></a><a id='L305' name='L305'></a> 305 <a href='../Y/149.html' title='Multiple used in 2 places.'>memset</a>(<a href='../Y/224.html' title='Multiple used in 243 places.'>sys</a>-&gt;<a href='../Y/148.html' title='Multiple used in 61 places.'>memory</a>, 0, <a href='../Y/224.html' title='Multiple used in 243 places.'>sys</a>-&gt;<a href='../Y/150.html' title='Multiple used in 31 places.'>memsize</a> * <strong class='reserved'>sizeof</strong>(<a href='../S/15098.html#L9' title='Defined at 9 in include/word.h.'>WORD</a>));
<a id='L341' name='L341'></a><a id='L306' name='L306'></a> 306 <em class='brace'>}</em>
<a id='L342' name='L342'></a><a id='L307' name='L307'></a> 307
<a id='L343' name='L343'></a><a id='L308' name='L308'></a> 308 <em class='comment'>/**</em>
<a id='L344' name='L344'></a><a id='L309' name='L309'></a> 309 <em class='comment'> * COMET II仮想マシンのCPUリセット</em>
<a id='L345' name='L345'></a><a id='L310' name='L310'></a> 310 <em class='comment'> */</em>
<a id='L346' name='L346'></a><a id='L311' name='L311'></a> 311 <strong class='reserved'>void</strong> <a href='../R/122.html' title='Multiple referred from 2 places.'>comet2_reset</a>()
<a id='L347' name='L347'></a><a id='L312' name='L312'></a> 312 <em class='brace'>{</em>
<a id='L348' name='L348'></a><a id='L313' name='L313'></a> 313 <em class='comment'>/* CPUをリセット */</em>
<a id='L349' name='L349'></a><a id='L314' name='L314'></a> 314 <a href='../S/15541.html#L291' title='Defined at 291 in src/struct.c.'>cpu_reset</a>();
<a id='L350' name='L350'></a><a id='L315' name='L315'></a> 315 <em class='brace'>}</em>
<a id='L351' name='L351'></a><a id='L316' name='L316'></a> 316
<a id='L352' name='L352'></a><a id='L317' name='L317'></a> 317 <em class='comment'>/**</em>
<a id='L353' name='L353'></a><a id='L318' name='L318'></a> 318 <em class='comment'> * COMET II仮想マシンのCPUとメモリをリセット</em>
<a id='L354' name='L354'></a><a id='L319' name='L319'></a> 319 <em class='comment'> */</em>
<a id='L355' name='L355'></a><a id='L320' name='L320'></a> 320 <strong class='reserved'>void</strong> <a href='../R/123.html' title='Multiple referred from 2 places.'>comet2_resetall</a>()
<a id='L356' name='L356'></a><a id='L321' name='L321'></a> 321 <em class='brace'>{</em>
<a id='L357' name='L357'></a><a id='L322' name='L322'></a> 322 <em class='comment'>/* CPUをリセット */</em>
<a id='L358' name='L358'></a><a id='L323' name='L323'></a> 323 <a href='../S/15541.html#L291' title='Defined at 291 in src/struct.c.'>cpu_reset</a>();
<a id='L359' name='L359'></a><a id='L324' name='L324'></a> 324 <em class='comment'>/* メモリをリセット */</em>
<a id='L360' name='L360'></a><a id='L325' name='L325'></a> 325 <a href='../S/15541.html#L304' title='Defined at 304 in src/struct.c.'>memory_reset</a>();
<a id='L361' name='L361'></a><a id='L326' name='L326'></a> 326 <em class='brace'>}</em>
<a id='L362' name='L362'></a><a id='L327' name='L327'></a> 327
<a id='L363' name='L363'></a><a id='L328' name='L328'></a> 328 <em class='comment'>/**</em>
<a id='L364' name='L364'></a><a id='L329' name='L329'></a> 329 <em class='comment'> * COMET II仮想マシンのシャットダウン</em>
<a id='L365' name='L365'></a><a id='L330' name='L330'></a> 330 <em class='comment'> */</em>
<a id='L366' name='L366'></a><a id='L331' name='L331'></a> 331 <strong class='reserved'>void</strong> <a href='../R/124.html' title='Multiple referred from 5 places.'>comet2_shutdown</a>()
<a id='L367' name='L367'></a><a id='L332' name='L332'></a> 332 <em class='brace'>{</em>
<a id='L368' name='L368'></a><a id='L333' name='L333'></a> 333 <a href='../S/15097.html#L22' title='Defined at 22 in include/cmem.h.'>FREE</a>(<a href='../Y/91.html' title='Multiple used in 25 places.'>execptr</a>);
<a id='L369' name='L369'></a><a id='L334' name='L334'></a> 334 <a href='../S/15097.html#L22' title='Defined at 22 in include/cmem.h.'>FREE</a>(<a href='../Y/224.html' title='Multiple used in 243 places.'>sys</a>-&gt;<a href='../Y/148.html' title='Multiple used in 61 places.'>memory</a>);
<a id='L370' name='L370'></a><a id='L335' name='L335'></a> 335 <a href='../S/15097.html#L22' title='Defined at 22 in include/cmem.h.'>FREE</a>(<a href='../Y/224.html' title='Multiple used in 243 places.'>sys</a>-&gt;<a href='../Y/78.html' title='Multiple used in 218 places.'>cpu</a>);
<a id='L371' name='L371'></a><a id='L336' name='L336'></a> 336 <a href='../S/15097.html#L22' title='Defined at 22 in include/cmem.h.'>FREE</a>(<a href='../Y/224.html' title='Multiple used in 243 places.'>sys</a>);
<a id='L372' name='L372'></a><a id='L337' name='L337'></a> 337 <em class='brace'>}</em>
<a id='L373' name='L373'></a></pre>
<a id='L374' name='L374'></a><hr />
<a id='L375' name='L375'></a><a id='BOTTOM' name='BOTTOM'></a>
<a id='L376' name='L376'></a><em class='comment'>/* [&lt;][&gt;]<a href='#L99'>[^]</a><a href='#L331'>[v]</a><a href='#TOP'>[top]</a>[bottom]<a href='../mains.html'>[index]</a><a href='../help.html'>[help]</a> */</em>
<a id='L377' name='L377'></a></body>
<a id='L378' name='L378'></a></html>
</pre>
<hr />
<a id='BOTTOM' name='BOTTOM'></a>
<em class='comment'>/* [<][>][^][v]<a href='#TOP'>[top]</a>[bottom]<a href='../mains.html'>[index]</a><a href='../help.html'>[help]</a> */</em>
</body>
</html>