home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 346_02 / m6816.h < prev    next >
C/C++ Source or Header  |  1991-02-10  |  2KB  |  119 lines

  1. /* m6816.h */
  2.  
  3. /*
  4.  * (C) Copyright 1991
  5.  * All Rights Reserved
  6.  *
  7.  * Alan R. Baldwin
  8.  * 721 Berkeley St.
  9.  * Kent, Ohio  44240
  10.  */
  11.  
  12. /*)BUILD
  13.     $(PROGRAM) =    AS6816
  14.     $(INCLUDE) = {
  15.         ASM.H
  16.         M6816.H
  17.     }
  18.     $(FILES) = {
  19.         M16EXT.C
  20.         M16MCH.C
  21.         M16ADR.C
  22.         M16PST.C
  23.         ASMAIN.C
  24.         ASLEX.C
  25.         ASSYM.C
  26.         ASSUBR.C
  27.         ASEXPR.C
  28.         ASDATA.C
  29.         ASLIST.C
  30.         ASOUT.C
  31.     }
  32.     $(STACK) = 2000
  33. */
  34.  
  35. /*
  36.  * Paging Values
  37.  */
  38. #define    PAGE1    0x17
  39. #define    PAGE2    0x27
  40. #define    PAGE3    0x37
  41.  
  42. /*
  43.  * Addressing types
  44.  */
  45. #define    T_IMM    0x01
  46. #define    T_EXT    0x02
  47. #define    T_INDX    0x04
  48. #define    T_E_I    0x08
  49. #define    T_IM8    0x10
  50. #define    T_IM16    0x20
  51. #define    T_IND8    0x40
  52. #define    T_IND16    0x80
  53.  
  54. /*
  55.  * 6816 Instruction types
  56.  */
  57. #define    S_IMMA    40
  58. #define    S_IM16    41
  59. #define    S_BIT    42
  60. #define    S_BITW    43
  61. #define    S_BRBT    44
  62. #define    S_LDED    45
  63. #define    S_MAC    46
  64. #define S_PSHM    47
  65. #define    S_PULM    48
  66. #define    S_JXX    49
  67. #define    S_MOVB    50
  68. #define    S_MOVW    51
  69. #define    S_CMP    52
  70. #define    S_STOR    53
  71. #define    S_LOAD    54
  72. #define    S_SOPW    55
  73. #define    S_SOP    56
  74. #define    S_DOPE    57
  75. #define    S_DOPD    58
  76. #define    S_DOP    59
  77. #define    S_INH27    60
  78. #define    S_INH37    61
  79. #define    S_LBRA    62
  80. #define    S_LBSR    63
  81. #define    S_BRA    64
  82. #define S_BSR    65
  83.  
  84. /*
  85.  * Set Direct Pointer
  86.  */
  87. #define    S_SDP    80
  88.  
  89.  
  90. struct adsym
  91. {
  92.     char    a_str[4];    /* addressing string */
  93.     int    a_val;        /* addressing mode value */
  94. };
  95.  
  96. extern struct adsym xyz[];
  97. extern struct adsym e[];
  98. extern struct adsym pshm[];
  99. extern struct adsym pulm[];
  100.  
  101.     /* machine dependent functions */
  102.  
  103.     /* m16adr.c */
  104. extern    int        addr();
  105. extern    int        amode();
  106. extern    int        any();
  107. extern    int        srch();
  108.  
  109.     /* m16mch.c */
  110. extern    VOID        machin();
  111. extern    int        mchabs();
  112. extern    VOID        mchubyt();
  113. extern    int        mchindx();
  114. extern    int        mchimm();
  115. extern    VOID        minit();
  116. extern    int        setbit();
  117. extern    int        getbit();
  118. extern    int        comma();
  119.