home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 40 / IOPROG_40.ISO / SOFT / NETFrameworkSDK.exe / comsdk.cab / samples1.exe / MyC / Src / IAsm.cs < prev    next >
Encoding:
Text File  |  2000-06-23  |  1.7 KB  |  56 lines

  1. namespace MyC
  2. {
  3. using System;
  4. using System.Collections;
  5. using System.Reflection;
  6.  
  7. public class IAsm
  8.   {
  9.   /*
  10.    * instruction types
  11.    */
  12.   public const int I_INSN    = 101;
  13.   public const int I_LABEL    = 102;
  14.   public const int I_BRANCH     = 103;
  15.   public const int I_CALL    = 104;
  16.   public const int I_RET     = 105;
  17.   public const int I_INSN_STORE    = 111;
  18.   public const int I_INSN_LOAD    = 112;
  19.   public const int I_INSN_LOAD_CONST = 113;
  20.   public const int I_COMMENT    = 120;
  21.   public const int I_FUNC_BEGIN    = 150;
  22.   public const int I_FUNC_END    = 151;
  23.   public const int I_FIELD    = 161;
  24.   public const int I_LOCALDEF    = 162;
  25.  
  26.   private IAsm next;
  27.   private int icount;
  28.   private int itype;        /* type of instruction */
  29.   private String insn;        /* instruction */
  30.   private String label;        /* label name ref */
  31.   private Var ivar;        /* variable pointer */
  32.   private String comment;    /* comment buffer */
  33.   private int linenumber;    /* line number */
  34.  
  35.   public void setNext(IAsm n) { next = n; }
  36.   public IAsm getNext() { return next; }
  37.   public void setICount(int i) { icount = i; }
  38.   public int getICount() { return icount; }
  39.   public void setIType(int i) { itype = i; }
  40.   public int getIType() { return itype; }
  41.   public void setInsn(String s) { insn = s; }
  42.   public String getInsn() { return insn; }
  43.   public void setLabel(String l) { label = l; }
  44.   public String getLabel() { return label; }
  45.   public void setVar(Var v) { ivar = v; }
  46.   public Var getVar() { return ivar; }
  47.   public void setComment(String c) { if (comment != null) Io.ICE("Comment overwrite");
  48.                     comment = c; }
  49.   public String getComment() { return comment; }
  50.   public void setCommentLine(int l) { linenumber = l; }
  51.   public int getCommentLine() { return linenumber; }
  52.   }
  53.  
  54.  
  55. }
  56.