wuc.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "uctools.h"

Include dependency graph for wuc.c:

Go to the source code of this file.

Defines

#define MAX_LABELS   3500
#define TOKEN_LENGTH   25600

Functions

void emit_byte (int i)
void emit_word (int i)
void emit_dword (int i)
void add_label (void)
int get_label (void)
void check_jump_label_16 (int label)
void check_data_label_16 (int label)
void read_token (FILE *fi)
int main (int argc, char *argv[])

Variables

static opcode_desc push_table []
static opcode_desc pop_table []
static const char * compiler_table []
char token [25600]
char * token2
char curlabel [256]
char indata
int byte
int word
int pass
int offset
int datasize
int codesize
int funcnum
int extended
char labels [3500][10]
int offsets [3500]
int lindex
FILE * fo
FILE * fi


Define Documentation

#define MAX_LABELS   3500

Definition at line 28 of file wuc.c.

Referenced by add_label().

#define TOKEN_LENGTH   25600

Definition at line 29 of file wuc.c.

Referenced by read_token().


Function Documentation

void add_label ( void   ) 

Definition at line 66 of file wuc.c.

References labels, lindex, MAX_LABELS, offset, offsets, and token.

Referenced by main().

void check_data_label_16 ( int  label  ) 

Definition at line 110 of file wuc.c.

References curlabel.

Referenced by main().

void check_jump_label_16 ( int  label  ) 

Definition at line 104 of file wuc.c.

References curlabel.

Referenced by main().

void emit_byte ( int  i  ) 

Definition at line 41 of file wuc.c.

References codesize, datasize, fo, indata, offset, and pass.

Referenced by emit_dword(), emit_word(), and main().

void emit_dword ( int  i  ) 

Definition at line 58 of file wuc.c.

References emit_byte().

Referenced by main().

Here is the call graph for this function:

void emit_word ( int  i  ) 

Definition at line 52 of file wuc.c.

References emit_byte().

Referenced by main().

Here is the call graph for this function:

int get_label ( void   ) 

Definition at line 88 of file wuc.c.

References labels, lindex, offsets, token, and word.

Referenced by main().

int main ( int  argc,
char *  argv[] 
)

Definition at line 156 of file wuc.c.

References add_label(), bg_intrinsic_size, bg_intrinsic_table, BYTE, CALL, check_data_label_16(), check_jump_label_16(), codesize, compiler_table, curlabel, DATA_STRING, DATA_STRING32, datasize, emit_byte(), emit_dword(), emit_word(), EXTCALL, extended, fi, FLGREF, fo, func_table, funcnum, get_label(), IMMED, IMMED32, IMMED_AND_RELATIVE_JUMP, IMMED_RELJUMP32, indata, lindex, offset, opcode_table, pass, POP, pop_table, PUSH, push_table, read_token(), RELATIVE_JUMP, RELATIVE_JUMP32, si_intrinsic_size, si_intrinsic_table, SLOOP, SLOOP32, token, token2, _opcode_desc::type, VARREF, and word.

Here is the call graph for this function:

void read_token ( FILE *  fi  ) 

Definition at line 117 of file wuc.c.

References token, and TOKEN_LENGTH.

Referenced by main().


Variable Documentation

int byte

Definition at line 32 of file wuc.c.

int codesize

Definition at line 32 of file wuc.c.

Referenced by emit_byte(), and main().

const char* compiler_table[] [static]

Initial value:

  {
    ".argc",
    ".extern",
    ".externsize",
    ".localc"
  }

Definition at line 20 of file wuc.c.

Referenced by main().

char curlabel[256]

Definition at line 31 of file wuc.c.

Referenced by check_data_label_16(), check_jump_label_16(), and main().

int datasize

Definition at line 32 of file wuc.c.

Referenced by emit_byte(), and main().

int extended

Definition at line 33 of file wuc.c.

Referenced by main(), and printfunc().

FILE * fi

Definition at line 39 of file wuc.c.

Referenced by Shape_file_set::append(), playfli::info(), main(), and rebuild().

FILE* fo

Definition at line 39 of file wuc.c.

Referenced by emit_byte(), main(), and rebuild().

int funcnum

Definition at line 32 of file wuc.c.

Referenced by main(), printfunc(), and process_func().

char indata

Definition at line 31 of file wuc.c.

Referenced by emit_byte(), and main().

char labels[3500][10]

Definition at line 35 of file wuc.c.

Referenced by add_label(), get_label(), and Uc_function::~Uc_function().

int lindex

Definition at line 37 of file wuc.c.

Referenced by add_label(), get_label(), and main().

int offset

Definition at line 32 of file wuc.c.

Referenced by add_label(), Uc_function::add_string(), Uc_string_symbol::create_expression(), emit_byte(), Uc_static_var_symbol::gen_assign(), Uc_var_symbol::gen_assign(), Uc_string_symbol::gen_value(), Uc_static_var_symbol::gen_value(), Uc_var_symbol::gen_value(), Uc_function::link(), main(), Text_button::paint(), Newfile_gump::paint(), printcodeseg(), process_code_seg(), Segment_file::retrieve(), Usecode_internal::run(), Game_object::say(), Game::show_menu(), Usecode_internal::uc_trace_disasm(), and Game_window::write_schedules().

int offsets[3500]

Definition at line 36 of file wuc.c.

Referenced by add_label(), get_label(), Get_slime_neighbors(), Shapes_vga_file::read_info(), Game_window::read_schedules(), Game_window::revert_schedules(), and Shape_file::save().

int pass

Definition at line 32 of file wuc.c.

Referenced by emit_byte(), and main().

opcode_desc pop_table[] [static]

Initial value:

  {
    {"eventid",0,0x4b}
  }

Definition at line 15 of file wuc.c.

Referenced by main().

opcode_desc push_table[] [static]

Initial value:

  {
    {"true",0,0x13},
    {"false",0,0x14},
    {"itemref",0,0x3e},
    {"eventid",0,0x48}
  }

Definition at line 7 of file wuc.c.

Referenced by main().

char token[25600]

Definition at line 31 of file wuc.c.

Referenced by add_label(), get_label(), Get_token(), main(), and read_token().

char * token2

Definition at line 31 of file wuc.c.

Referenced by main().

int word

Definition at line 32 of file wuc.c.

Referenced by get_label(), and main().


Generated on Mon Jul 9 14:45:50 2007 for ExultEngine by  doxygen 1.5.1