]> pd.if.org Git - mmurtl/blob - msamples/cm32m/proto32.h
autocommit for file dated 1995-01-30 22:28:40
[mmurtl] / msamples / cm32m / proto32.h
1 /* CM32 prototype file */\r
2 \r
3 static S8   is_alpha(S8  chr);\r
4 static S8   is_digit(S8  chr);\r
5 static S8   is_alnum(S8  chr);\r
6 static void copystring(S8  *dest, S8  *source);\r
7 static S8   equal_string(S8  *str1, S8  *str2);\r
8 static S8   skip_blanks(void);\r
9 static S32  more_parms(void);\r
10 static void skip_comment(void);\r
11 static void copy_name(void);\r
12 static void copy_string(void);\r
13 static U32  lookup_macro(S8 eflag);\r
14 static void resolve_macro(void);\r
15 static U32  match(S8 *ptr);\r
16 static long compareT(S8 *ptable, long peep);\r
17 static void exchange(U32 old, S8 *pnew);\r
18 static char *fgetcode(char *pout, long maxout);\r
19 static S32  read_line(void);\r
20 static void write_line(void);\r
21 static void optimize(void);\r
22 static S32  readline(void);\r
23 static U32  test_exit(void);\r
24 static void t_warn(S8 *msg, S8 *txt);\r
25 static void t_error(S8 *msg, S8 *txt);\r
26 static void symbol_error(S8 *msg);\r
27 static void syntax_error(void);\r
28 static void type_error(void);\r
29 static char test_token(U32 token);\r
30 static void expect(U32  token);\r
31 static void UTC_error(void);\r
32 static void line_error(S8 *message);\r
33 static void fatal_error(S8 *string);\r
34 static void check_loop(U32  stack[]);\r
35 static U32  check_switch(void);\r
36 static void test_jump(U32  label);\r
37 static void cond_jump(S8  cond, U32  label, S8  ljmp);\r
38 static U32  get_number(U32 base, U32 digits);\r
39 static void clean_up(void);\r
40 static S8   read_char(void);\r
41 static void unget_token(U32  token);\r
42 static U32  read_special(S8  delim);\r
43 static U32  get_token(void);\r
44 static U32  lookup_local(void);\r
45 static U32  lookup_global(void);\r
46 static U32  lookup_member(U32 CrntStruc);\r
47 static void define_symbol(U32  type, U32  dim_index);\r
48 static void push(U32  token, U32  value, U32  type, U32 offset);\r
49 static void pop(U32  *token, U32  *value, U32  *type, U32 *offset);\r
50 static void get_constant(U32  *token, U32  *value);\r
51 static void define_var(U32  type);\r
52 static void check_func(void);\r
53 static void declare(U32  token, U32  type);\r
54 static void define_func(U32  type);\r
55 static void sub_eval(U32  term);\r
56 static void eval(U32  term, char flag);\r
57 static void out_inst(S8  *ptr);\r
58 static void write_oper(U32 token, U32 value, U32 type, U32 offset);\r
59 static void GenCodeOper(char *ptr, U32 token, U32 value, U32 type, U32 offset);\r
60 static void StackAcc(void);\r
61 static void StackTop(void);\r
62 static void StackIndex(void);\r
63 static void load_index(U32  t, U32  v, U32  tt, U32 o);\r
64 static void do_unary(U32  oper);\r
65 static S8 eval_index(U32 t, U32 v, U32 tp, U32 ofs, U32 *tpRet);\r
66 static void get_value(void);\r
67 static U32  combine(U32  type1, U32  type2);\r
68 static U32  do_oper(U32  token);\r
69 static void do_lr2op(U32  oper);\r
70 static U32 CheckStack(U32  token, U32  type);\r
71 static void accval(U32 oper, U32 rtype, U32 token, U32 value, U32 type, U32 offset);\r
72 static void test_not(void);\r
73 static void LoadAcc(U32  token, U32  value, U32  type, U32 offset);\r
74 static void store(U32 atype, U32 token, U32 value, U32 type, U32 offset);\r
75 static void LoadSec(U32 token, U32 value, U32 type, U32 offset);\r
76 static U32  ispStruct(U32 type, U32 value);\r
77 static U32  isp32(U32  type);\r
78 static U32  isp16(U32  type);\r
79 static void do_asm(S8  *ptr);\r
80 static void out_source(S8  *line);\r
81 static void init_static(U32  token, U32  value, S8  word);\r
82 static void end_static(void);\r
83 static void gen_global(U32  symbol, U32  size);\r
84 static void gen_extern(U32  symbol);\r
85 static void gen_extern_DASM (U32 symbol);\r
86 static void gen_ext_data_DASM (U32 symbol);\r
87 static void enter_func(U32  symbol, U32  size);\r
88 static void end_func(U32  stackpop);\r
89 static void gen_label(U32  label);\r
90 static void gen_literal(U8  *ptr, U32  size);\r
91 static void call(U32 token, U32 value, U32 type, U32 offset, U32 clean);\r
92 static void jump(U32  label, S8  ljmp);\r
93 static void jump_if(S8  cond, U32  label, S8  ljmp);\r
94 static void do_switch(U32  label);\r
95 static void build_switch(U32  d);\r
96 static void index_ptr(U32  token, U32  value, U32  type, U32 offset);\r
97 static void index_adr(U32  token, U32  value, U32  type, U32 offset);\r
98 static void code_global(U32 symbol);\r
99 static void data_global(U32 symbol);\r
100 static void code_chr(S8  chr);\r
101 static void code_str(S8  *ptr);\r
102 static void code_num(U32 value);\r
103 static void data_chr(S8  chr);\r
104 static void data_str(S8  *ptr);\r
105 static void data_num(U32 value);\r
106 static void put_num(U32  value, FILE *outfile);\r
107 static void statement(U32  token);\r
108 static void begin_data(void);\r
109 static void begin_code(void);\r
110 static void compile(void);\r
111 void main(S32 argc, S8 *argv[]);\r
112 \r
113 /* END of PROTOTYPES  */\r