Exemple #1
0
        public void LoadHex(String filename)
        {
            Boolean    flag;
            List <int> bytes;
            UInt16     address;
            IntelHex   hex = new IntelHex();

            if (!hex.Load(filename))
            {
                return;
            }
            flag  = true;
            bytes = hex.First();
            if (bytes.Count < 1)
            {
                flag = false;
            }
            while (flag)
            {
                address = (UInt16)bytes[0];
                for (var i = 1; i < bytes.Count; i++)
                {
                    memory[address++] = (byte)bytes[i];
                }
                bytes = hex.Next();
                if (bytes.Count < 1)
                {
                    flag = false;
                }
            }
        }
Exemple #2
0
 public Assembler()
 {
     init();
     outputMode      = 'M';
     hexOutput       = new IntelHex();
     showSymbolTable = false;
     crossReference  = false;
     showMemoryMap   = false;
     memoryMap       = new char[65536];
 }