YACASL2
Loading...
Searching...
No Matches
struct.c File Reference
#include <errno.h>
#include "struct.h"
#include "exec.h"
Include dependency graph for struct.c:

Go to the source code of this file.

Enumerations

enum  { CMDTABSIZE = 41 }

Functions

unsigned hash_cmdtype (const char *cmd, CMDTYPE type)
unsigned hash_code (WORD code)
void cpu_reset ()
void memory_reset ()
bool create_cmdtable (CMDTAB_HASH hash)
 命令ハッシュ表を作成する
void free_cmdtable (CMDTAB_HASH hash)
WORD getcmdcode (const char *cmd, CMDTYPE type)
WORD getcmdwordlen (const char *cmd, CMDTYPE type)
void * getcmdptr (WORD code)
CMDTYPE getcmdtype (WORD code)
char * getcmdname (WORD code)
bool code_gr_valid (WORD code)
WORD code2cmdwordlen (WORD code)
char * grstr (WORD word)
 汎用レジスタの番号からレジスタを表す文字列を返す
WORD memsize_str2word (const char *str)
 メモリーサイズを表す数値文字列をWORD値に変換して返す。WORD値に変換できない場合は、エラーを表示して0を返す
void comet2_init (WORD memsize, CLOCK clocks)
 COMET II仮想マシンの初期化
void comet2_reset ()
 COMET II仮想マシンのCPUをリセット
void comet2_resetall ()
void comet2_shutdown ()
 COMET II仮想マシンのシャットダウン

Variables

SYSTEMsys = NULL
 COMET IIの仮想実行マシンシステム
EXECPTRexecptr = NULL
static const COMET2CMD comet2cmd []
static int comet2cmdsize = ARRAYSIZE(comet2cmd)
static CMDTABcmdtab [HASH_MAX][CMDTABSIZE] = {{NULL}}

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

ハッシュ表のサイズ

Enumerator
CMDTABSIZE 

Definition at line 67 of file struct.c.

Function Documentation

◆ code2cmdwordlen()

WORD code2cmdwordlen ( WORD code)

命令コードから、命令語長を返す 無効な場合は0を返す

Definition at line 294 of file struct.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ code_gr_valid()

bool code_gr_valid ( WORD code)

命令コードから、GRの範囲が正常な場合はtrue 異常な場合はfalseを返す

Definition at line 269 of file struct.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ comet2_init()

void comet2_init ( WORD memsize,
CLOCK clocks )

COMET II仮想マシンの初期化

COMET II仮想マシンの初期化

Definition at line 329 of file struct.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ comet2_reset()

void comet2_reset ( )

COMET II仮想マシンのCPUをリセット

COMET II仮想マシンのCPUリセット

Definition at line 371 of file struct.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ comet2_resetall()

void comet2_resetall ( )

COMET II仮想マシンのCPUとメモリをリセット

Definition at line 384 of file struct.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ comet2_shutdown()

void comet2_shutdown ( )

COMET II仮想マシンのシャットダウン

COMET II仮想マシンのシャットダウン

Definition at line 399 of file struct.c.

Here is the caller graph for this function:

◆ cpu_reset()

void cpu_reset ( )

CPUのリセット

Definition at line 351 of file struct.c.

Here is the caller graph for this function:

◆ create_cmdtable()

bool create_cmdtable ( CMDTAB_HASH hash)

命令ハッシュ表を作成する

命令ハッシュ表を作成する

Definition at line 124 of file struct.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ free_cmdtable()

void free_cmdtable ( CMDTAB_HASH hash)

命令ハッシュ表を解放する

Definition at line 146 of file struct.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getcmdcode()

WORD getcmdcode ( const char * cmd,
CMDTYPE type )

命令の名前とタイプから、命令コードを返す
無効な場合は0xFFFFを返す

Definition at line 164 of file struct.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getcmdname()

char * getcmdname ( WORD code)

命令コードから命令の名前を返す

Definition at line 252 of file struct.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getcmdptr()

void * getcmdptr ( WORD code)

命令コードから命令の関数ポインタを返す

Definition at line 218 of file struct.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getcmdtype()

CMDTYPE getcmdtype ( WORD code)

命令コードから命令のタイプを返す

Definition at line 235 of file struct.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getcmdwordlen()

WORD getcmdwordlen ( const char * cmd,
CMDTYPE type )

命令の名前とタイプから、命令語長を返す
無効な場合は0を返す

Definition at line 183 of file struct.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ grstr()

char * grstr ( WORD word)

汎用レジスタの番号からレジスタを表す文字列を返す

汎用レジスタの番号からレジスタを表す文字列を返す

Definition at line 312 of file struct.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hash_cmdtype()

unsigned hash_cmdtype ( const char * cmd,
CMDTYPE type )

命令の名前とタイプからハッシュ値を生成する

Definition at line 99 of file struct.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hash_code()

unsigned hash_code ( WORD code)

命令コードからハッシュ値を生成する

Definition at line 201 of file struct.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ memory_reset()

void memory_reset ( )

メモリのリセット

Definition at line 364 of file struct.c.

Here is the caller graph for this function:

◆ memsize_str2word()

WORD memsize_str2word ( const char * str)

メモリーサイズを表す数値文字列をWORD値に変換して返す。WORD値に変換できない場合は、エラーを表示して0を返す

Returns
メモリーサイズのWORD値である、1から65536までの範囲の整数。エラー時は0
Parameters
strメモリーサイズを表す数値文字列

Definition at line 322 of file struct.c.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ cmdtab

CMDTAB* cmdtab[HASH_MAX][CMDTABSIZE] = {{NULL}}
static

ハッシュ表

Definition at line 74 of file struct.c.

◆ comet2cmd

const COMET2CMD comet2cmd[]
static

システムCOMET IIの命令表

Definition at line 18 of file struct.c.

◆ comet2cmdsize

int comet2cmdsize = ARRAYSIZE(comet2cmd)
static

命令表のサイズ

Definition at line 62 of file struct.c.

◆ execptr

EXECPTR* execptr = NULL

プログラム実行時の開始と終了のアドレス

Definition at line 13 of file struct.c.

◆ sys

SYSTEM* sys = NULL

COMET IIの仮想実行マシンシステム

COMET IIの仮想実行マシンシステム

Definition at line 8 of file struct.c.