YACASL2
Loading...
Searching...
No Matches
disassemble.c File Reference
#include "disassemble.h"
Include dependency graph for disassemble.c:

Go to the source code of this file.

Functions

WORD fgetword (FILE *stream)
 ファイルストリームから1ワードを取得する
void fungetword (FILE *stream)
 ファイルストリームを1ワード戻す
WORD zero_data_cnt (FILE *stream)
 ファイルストリームから、値が0の連続するWORD数を返す
void disassemble_puts_code (int ascol, WORD pradr, int wordc, WORD wordv[])
 機械コードをコメントとして標準出力へ出力する
void disassemble_cmd_adr_x (CMDTYPE cmdtype, const char *cmdname, WORD word, WORD adr, WORD pradr)
 種類がR_ADRまたはR_ADR_Xのコマンドを逆アセンブルし、標準出力へ出力する
void disassemble_cmd_r (CMDTYPE cmdtype, const char *cmdname, WORD word, WORD pradr)
 種類がR1_R2またはR_のコマンドを逆アセンブルし、標準出力へ出力する
void disassemble_dc (WORD word, WORD pradr)
 DCコマンドを逆アセンブルし、標準出力へ出力する
void disassemble_ds (WORD wcnt, WORD pradr)
bool disassemble_file (const char *file)
 CASL IIのオブジェクトファイルを逆アセンブルし、標準出力へ出力する
void disassemble_memory (WORD start, WORD end)
 COMET IIのメモリーを逆アセンブルし、標準出力へ出力する

Variables

int codecol = 32
 機械コードの出力列

Function Documentation

◆ disassemble_cmd_adr_x()

void disassemble_cmd_adr_x ( CMDTYPE cmdtype,
const char * cmdname,
WORD word,
WORD adr,
WORD pradr )

種類がR_ADRまたはR_ADR_Xのコマンドを逆アセンブルし、標準出力へ出力する

Parameters
cmdtypeコマンドの種類
*cmdnameコマンドの名前
wordワード値
adrアドレス値
pradr次に実行すべき命令語の先頭アドレス

Definition at line 83 of file disassemble.c.

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

◆ disassemble_cmd_r()

void disassemble_cmd_r ( CMDTYPE cmdtype,
const char * cmdname,
WORD word,
WORD pradr )

種類がR1_R2またはR_のコマンドを逆アセンブルし、標準出力へ出力する

Parameters
cmdtypeコマンドの種類
*cmdnameコマンドの名前
wordワード値
pradr次に実行すべき命令語の先頭アドレス

Definition at line 102 of file disassemble.c.

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

◆ disassemble_dc()

void disassemble_dc ( WORD word,
WORD pradr )

DCコマンドを逆アセンブルし、標準出力へ出力する

Parameters
wordワード値
pradr次に実行すべき命令語の先頭アドレス

Definition at line 124 of file disassemble.c.

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

◆ disassemble_ds()

void disassemble_ds ( WORD wcnt,
WORD pradr )

Definition at line 134 of file disassemble.c.

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

◆ disassemble_file()

bool disassemble_file ( const char * file)

CASL IIのオブジェクトファイルを逆アセンブルし、標準出力へ出力する

Returns
正常終了時は0、異常終了時は0以外
Parameters
*fileオブジェクトファイルのファイル名

Definition at line 173 of file disassemble.c.

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

◆ disassemble_memory()

void disassemble_memory ( WORD start,
WORD end )

COMET IIのメモリーを逆アセンブルし、標準出力へ出力する

Parameters
*start逆アセンブルの開始位置
*end逆アセンブルの終了位置

Definition at line 228 of file disassemble.c.

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

◆ disassemble_puts_code()

void disassemble_puts_code ( int ascol,
WORD pradr,
int wordc,
WORD wordv[] )

機械コードをコメントとして標準出力へ出力する

Parameters
ascolアセンブラの列位置
pradr次に実行すべき命令語の先頭アドレス
wordcワード値の数
wordvワード値の配列

Definition at line 72 of file disassemble.c.

Here is the caller graph for this function:

◆ fgetword()

WORD fgetword ( FILE * stream)

ファイルストリームから1ワードを取得する

Returns
取得した1ワード
Parameters
streamファイルストリーム

Definition at line 146 of file disassemble.c.

Here is the caller graph for this function:

◆ fungetword()

void fungetword ( FILE * stream)

ファイルストリームを1ワード戻す

Parameters
streamファイルストリーム

Definition at line 153 of file disassemble.c.

Here is the caller graph for this function:

◆ zero_data_cnt()

WORD zero_data_cnt ( FILE * stream)

ファイルストリームから、値が0の連続するWORD数を返す

Returns
値が0の連続するWORD数
Parameters
streamファイルストリーム

Definition at line 158 of file disassemble.c.

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

Variable Documentation

◆ codecol

int codecol = 32

機械コードの出力列

Definition at line 6 of file disassemble.c.