home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 2 / RISC_DISC_2.iso / pd_share / program / language / motasm / src_h_glovars < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-13  |  4.6 KB  |  83 lines

  1. /* global variables */
  2. int     Line_num =0;            /* current global line number          */
  3. int     Local_Line_num =0;      /* current file line number          */
  4. int     PageLen =0;             /* page form length from input line */
  5. int     Err_count =0;           /* total number of errors       */
  6. char    Line[MAXBUF] = {0};     /* input line buffer            */
  7. char    Label[MAXLAB] = {0};    /* label on current line        */
  8. char    Op[MAXOP] = {0};        /* opcode mnemonic on current line      */
  9. char    Operand[MAXBUF] = {0};  /* remainder of line after op           */
  10.                                 /* (up to ';' rel TER_2.0) */
  11. char    *Optr =0;               /* pointer into current Operand field   */
  12. int     Result =0;              /* result of expression evaluation      */
  13. int     Force_word =0;          /* Result should be a word when set     */
  14. int     Force_byte =0;          /* Result should be a byte when set     */
  15. int     Pc =0;                  /* Program Counter              */
  16. int     Old_pc =0;              /* Program Counter at beginning */
  17.  
  18. int     Last_sym =0;            /* result of last lookup        */
  19.  
  20. int     Pass =0;                /* Current pass #               */
  21. int     N_files =0;             /* Number of files to assemble  */
  22. FILE    *Fd =0;                 /* Current input file structure */
  23. int     Cfn =0;                 /* Current file number 1...n    */
  24. int     Ffn =0;                 /* forward ref file #           */
  25. int     F_ref =0;               /* next line with forward ref   */
  26. char    **Argv =0;              /* pointer to file names        */
  27.  
  28. int     E_total =0;             /* total # bytes for one line   */
  29. int     E_bytes[E_LIMIT] = {0}; /* Emitted held bytes           */
  30. int     E_pc =0;                /* Pc at beginning of collection*/
  31.  
  32. int     Lflag = 0;              /* listing flag 0=nolist, 1=list*/
  33. int     ObjFilePos=0;            /* Object file name position in command line*/
  34.  
  35.  
  36. int     P_force = 0;            /* force listing line to include Old_pc */
  37. int     P_total =0;             /* current number of bytes collected    */
  38. int     P_bytes[P_LIMIT] = {0}; /* Bytes collected for listing  */
  39.  
  40. int     Splitflag =0;           /* split xref, list and map files */
  41. int     Cflag = 0;              /* cycle count flag */
  42. int     Cycles = 0;             /* # of cycles per instruction  */
  43. long    Ctotal = 0;             /* # of cycles seen so far */
  44. int     Sflag = 0;              /* symbol table flag, 0=no symbol */
  45. int     N_page = 0;             /* new page flag */
  46. int     Page_num = 2;           /* page number */
  47. int     CREflag = 0;            /* cross reference table flag */
  48. int     ENDflag = 0;            /* enable END directive flag */
  49. int     CRflag = 0;             /* flag to add <CR><LF> to S record */
  50.                                 /* added ver TER_1.1 June 3, 1989 */
  51. int     nfFlag = 1;             /* if=1 number INCLUDE files separate */
  52.                                 /* ver TER_2.0 June 17, 1989 */
  53. int     FdCount = 0;            /* INCLUDE files "stack" pointer */
  54.                                 /* ver TER_2.0 June 17, 1989 */
  55. char    InclFName[MAXBUF]={0};  /* current INCLUDE file name */
  56. int     F_total = 0;            /* total bytes emitted in S file */
  57.                                 /* ver (TER) 2.02 19 Jun 89 */
  58. int     Page_lines = 0;         /* total lines this page */
  59.                                 /* ver (TER) 2.02 19 Jun 89 */
  60. int     Pflag50 = 0;            /* if 1 then form feed every 50 lines */
  61.                                 /* ver (TER) 2.02 19 Jun 89 */
  62. int     PC_Save[4] = {0,0,0,0}; /* saved contents of CODE,DATA,BSS,AUTO PCs */
  63.                                 /* ver TER_2.09 25 July 89 */
  64. int     PC_ptr = 0;             /* index or pointer to current PC */
  65.                                 /* initialized to CODE ver TER_2.09 25 July 89 */
  66. int     Pflag = 0;              /* selects c preprocessing */
  67. int     NoAflag = 0;            /* selects c preprocessing only when cpp selected */
  68. struct  nlist *root;            /* root node of the tree */
  69. struct  InclFile InclFiles[MAXINCFILES];        /* the nesting stack itself */
  70. FILE    *Objfil =0;             /* object file's file descriptor*/
  71. FILE    *Forward; /* temp file's file descriptor  */
  72. FILE    *Listfil; /* list file's file descriptor  */
  73. FILE    *Mapfil; /* map file's file descriptor  */
  74. FILE    *Xfil; /* Xref file's file descriptor  */
  75. FILE    *Pfil; /* cpp file's file descriptor  */
  76. char    *Obj_name;
  77. char    Fwd_name[] = {"<Wimp$ScrapDir>.Asm11Fwd"};
  78.  
  79. int     cppargpos[10];
  80. int     cppargc;
  81. char    *cppnp[256];
  82. int     end_found = NO;
  83.