Exemplo n.º 1
0
        public override Program Load(Address addrLoad)
        {
            var arch = new Pdp11Architecture();

            arch.Name = "pdp11";

            var rdr = new LeImageReader(RawImage);

            var tuple = ReadDataBlocks(rdr);

            if (tuple == null)
            {
                throw new BadImageFormatException("The file doesn't appear to be in LDA format.");
            }

            var platform = new RT11Platform(Services, arch);
            var program  = new Program
            {
                Architecture = arch,
                Platform     = platform,
                SegmentMap   = tuple.Item2,
            };

            this.addrEntry = Address.Ptr16(tuple.Item1);
            return(program);
        }
Exemplo n.º 2
0
        public override Program Load(Address addrLoad)
        {
            var arch = new Pdp11Architecture();

            arch.Name = "pdp11";

            var  rdr = new LeImageReader(RawImage);
            byte b;

            while (rdr.TryPeekByte(0, out b) && b == 0)
            {
                rdr.Offset += 1;
            }

            var segMap = ReadDataBlocks(rdr);

            var platform = new RT11Platform(Services, arch);
            var program  = new Program
            {
                Architecture = arch,
                Platform     = platform,
                SegmentMap   = segMap
            };

            return(program);
        }
Exemplo n.º 3
0
        public override Program Load(Address?addrLoad)
        {
            var arch = new Pdp11Architecture(Services, "pdp11", new Dictionary <string, object>());

            var rdr = new LeImageReader(RawImage);

            var(uAddrStart, segmentMap) = ReadDataBlocks(rdr);
            if (segmentMap is null)
            {
                throw new BadImageFormatException("The file doesn't appear to be in LDA format.");
            }

            var platform = new RT11Platform(Services, arch);
            var program  = new Program
            {
                Architecture = arch,
                Platform     = platform,
                SegmentMap   = segmentMap,
            };

            this.addrEntry = Address.Ptr16(uAddrStart);
            return(program);
        }
Exemplo n.º 4
0
        public override Program Load(Address addrLoad)
        {
            var arch = new Pdp11Architecture();
            arch.Name = "pdp11";

            var rdr = new LeImageReader(RawImage);
            byte b;
            while (rdr.TryPeekByte(0, out b) && b == 0)
            {
                rdr.Offset += 1;
            }

            var segMap = ReadDataBlocks(rdr);

            var platform = new RT11Platform(Services, arch);
            var program = new Program
            {
                Architecture = arch,
                Platform = platform,
                SegmentMap = segMap
            };
           
            return program;
        }