YACASL2
Enumerations | Functions | Variables
struct.c File Reference
#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)
 
bool create_cmdtable (CMDTAB_HASH hash)
 命令ハッシュ表を作成する More...
 
void free_cmdtable (CMDTAB_HASH hash)
 
WORD getcmdcode (const char *cmd, CMDTYPE type)
 
const void * getcmdptr (WORD code)
 
CMDTYPE getcmdtype (WORD code)
 
char * getcmdname (WORD code)
 
char * grstr (WORD word)
 汎用レジスタの番号からレジスタを表す文字列を返す More...
 
void reset (int memsize, int clocks)
 
void shutdown ()
 

Variables

SYSTEMsys = NULL
 COMET IIの仮想実行マシンシステム More...
 
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 66 of file struct.c.

Function Documentation

◆ create_cmdtable()

bool create_cmdtable ( CMDTAB_HASH  hash)

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

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

Definition at line 113 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 135 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 153 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 222 of file struct.c.

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

◆ getcmdptr()

const void* getcmdptr ( WORD  code)

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

Definition at line 188 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 205 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 240 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 88 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 171 of file struct.c.

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

◆ reset()

void reset ( int  memsize,
int  clocks 
)

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

Definition at line 253 of file struct.c.

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

◆ shutdown()

void shutdown ( )

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

Definition at line 278 of file struct.c.

Here is the caller graph for this function:

Variable Documentation

◆ cmdtab

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

ハッシュ表

Definition at line 73 of file struct.c.

◆ comet2cmd

const COMET2CMD comet2cmd[]
static

システムCOMET IIの命令表

Definition at line 17 of file struct.c.

◆ comet2cmdsize

int comet2cmdsize = ARRAYSIZE(comet2cmd)
static

命令表のサイズ

Definition at line 61 of file struct.c.

◆ execptr

EXECPTR* execptr = NULL

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

Definition at line 12 of file struct.c.

◆ sys

SYSTEM* sys = NULL

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

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

Definition at line 7 of file struct.c.