home *** CD-ROM | disk | FTP | other *** search
/ Total Destruction / Total_Destruction.iso / addons / Lccwin32.exe / Lccwin32 / lccpub / src / asmproto.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-11  |  5.7 KB  |  113 lines

  1. /* Prototypes for D:\NGAS1\ASM.C. Generated  1995.11.4.13.25.47 */
  2.  
  3.  
  4.  
  5. #ifndef T_ASMPROTO_H_ID
  6.  
  7. #define T_ASMPROTO_H_ID
  8.  
  9. static char * xmalloc (long n );
  10.  
  11. static void error (char * s );
  12.  
  13. static void append (char * * charPP ,char * fromP ,unsigned long length );
  14.  
  15. static void subsegs_begin (void);
  16.  
  17. static void subseg_change (register segT seg ,register int subseg );
  18.  
  19. static void subseg_new (register segT seg ,register subsegT subseg );
  20.  
  21. static void symbol_begin (void);
  22.  
  23. static symbolS * symbol_new (char * name ,unsigned char type ,valueT value ,struct frag * frag );
  24.  
  25. static void colon (register char * sym_name );
  26.  
  27. static void symbol_table_insert (struct symbol * symbolP );
  28.  
  29. static void SetFlags(symbolS *coffS);
  30.  
  31. static symbolS * symbol_find_or_make (char * name );
  32.  
  33. static void frag_grow (unsigned int nchars );
  34.  
  35. static void frag_new (int old_frags_var_max_size );
  36.  
  37. static char * frag_more (int nchars );
  38.  
  39. static char * frag_var (relax_stateT type ,int max_chars ,int var ,relax_substateT subtype ,symbolS * symbol ,long int offset ,char * opcode );
  40.  
  41. static void frag_wane (fragS * fragP );
  42.  
  43. static void frag_align (int alignment ,int fill_character );
  44.  
  45. static segT operand (register expressionS * expressionP );
  46.  
  47. static void clean_up_expression (register expressionS * expressionP );
  48.  
  49. static segT expr_part (struct symbol * * symbol_1_PP ,struct symbol * symbol_2_P );
  50.  
  51. static segT expr (register operator_rankT rank ,register expressionS * resultP );
  52.  
  53. static char get_symbol_end (void);
  54.  
  55. static char * input_file_give_next_buffer (char * where );
  56.  
  57. static void InitAsmInput (void);
  58.  
  59. static char * input_scrub_new_file (char * filename );
  60.  
  61. static char * input_scrub_next_buffer (char * * bufp );
  62.  
  63. static void bump_line_counters (void);
  64.  
  65. static void as_where (void);
  66.  
  67. static void as_perror (char * gripe ,char * filename );
  68.  
  69. static void _obstack_begin (struct obstack * h ,int size ,int alignment ,void *(*chunkfun )(),void (* freefun )());
  70.  
  71. static void _obstack_newchunk (struct obstack * h ,int length );
  72.  
  73. static void read_begin (void);
  74.  
  75. static char * hash_insert (struct HASH_LIST * where ,char * name ,char * data );
  76.  
  77. static char * hash_find (struct HASH_LIST * w ,char * n );
  78.  
  79. static struct HASH_LIST * hash_new (void);
  80.  
  81. static char * hash_jam (struct HASH_LIST * where ,char * n ,char * data );
  82.  
  83. static void pobegin (void);
  84.  
  85. static void read_a_source_file (char * buffer );
  86.  
  87. static void s_align (void);
  88.  
  89. static void s_comm (void);
  90.  
  91. static void s_data (void);
  92.  
  93. static void s_file (void);
  94.  
  95. static void s_globl (void);
  96.  
  97. static void s_lcomm (void);
  98.  
  99. static void s_line (void);
  100.  
  101. static void s_long (void);
  102.  
  103. static void s_int (void);
  104.  
  105. static void s_lsym (void);
  106.  
  107. static void s_space (void);
  108.  
  109. static void s_text (void);
  110.  
  111. static void s_type (void);
  112.  
  113. static void s_size (void);
  114.  
  115. static void demand_empty_rest_of_line (void);
  116.  
  117. static void ignore_rest_of_line (void);
  118.  
  119. static void stab (int what );
  120.  
  121. static void pseudo_set (symbolS * symbolP );
  122.  
  123. static void cons (int nbytes );
  124.  
  125. static void stringer (int append_zero );
  126.  
  127. static int next_char_of_string (void);
  128.  
  129. static segT get_segmented_expression (register expressionS * expP );
  130.  
  131. static segT get_known_segmented_expression (expressionS * expP );
  132.  
  133. static long int get_absolute_expression (void);
  134.  
  135. static char get_absolute_expression_and_terminator (long int * val_pointer );
  136.  
  137. static char * demand_copy_C_string (int * len_pointer );
  138.  
  139. static char * demand_copy_string (int * lenP );
  140.  
  141. static int is_it_end_of_statement (void);
  142.  
  143. static void equals (char * sym_name );
  144.  
  145. static void InitializeAsmTables (void);
  146.  
  147. static void AsmI386Instruction (char * line );
  148.  
  149. static int i386_operand (char * operand_string );
  150.  
  151. static int md_estimate_size_before_relax (register fragS * fragP ,register int segment_type );
  152.  
  153. static void md_convert_frag (register fragS * fragP );
  154.  
  155. static void md_number_to_chars (char con [ ] ,long int value ,int nbytes );
  156.  
  157. static char * output_invalid (char c );
  158.  
  159. static reg_entry * parse_register (char * reg_string );
  160.  
  161. static void WriteCoffHeader (int ns );
  162.  
  163. static long WriteTextSection (long siz ,long nfixups );
  164.  
  165. static long WriteDataSection (long siz ,long nfixups ,int addr );
  166.  
  167. static long WriteBssSection (long siz );
  168.  
  169. static int ArrangeDataSection (int ordinal );
  170.  
  171. static int ArrangeOrdinalNumbers (char * name );
  172.  
  173. static int SortFun (const void * f1 ,const void * f2 );
  174.  
  175. static int WriteRelocations (int which);
  176.  
  177. static STRING * NewString (char * s ,int len );
  178.  
  179. static int AddStringToStringTable (char * str );
  180.  
  181. static long WriteStringTable (void);
  182.  
  183. static int SortSymbols (const void * f1 ,const void * f2 );
  184.  
  185. static int WriteLineNumbers (int PosCodeSection );
  186.  
  187. static int WriteOneSymbol (char * p );
  188.  
  189. static int WriteFunctionRecords (symbolS * coffS );
  190.  
  191. static int SymbolToChars (symbolS * coffS );
  192.  
  193. static int WriteDataSymbols (int count );
  194.  
  195. static int WriteSpecialSymbols (int result );
  196.  
  197. static int WriteAllCoffSymbols (int startCount );
  198.  
  199. static int WriteFileName (char * name );
  200.  
  201. static COFF_RELOC * AddCoffRelocation (symbolS * coffS ,int where ,int pcrel );
  202.  
  203. static void fix_new (fragS * frag ,int where ,short int size ,symbolS * add_symbol ,symbolS * sub_symbol ,long int offset ,int pcrel );
  204.  
  205. static void relax_segment (struct frag * segment_frag_root ,segT segment_type );
  206.  
  207. static relax_addressT relax_align (register relax_addressT address ,register long int alignment );
  208.  
  209. static long int fixup_segment (fixS * fixP ,int this_segment_type );
  210.  
  211. static int emit_relocations (register fixS * fixP);
  212.  
  213. static int is_dnrange (struct frag * f1 ,struct frag * f2 );
  214.  
  215. int main (int argc ,char * * argv );
  216.  
  217. void WriteError(void);
  218.  
  219. void InternalError(int err);
  220.  
  221. static void MakeBssSymbol(symbolS *symbolP,int siz,int localflag);
  222.  
  223. #endif
  224.  
  225.