예제 #1
0
        public void Register(IInstructionSet instructionSet)
        {
            int          baseAddress = 0x01c0;
            IInstruction i;

            for (int ea_mode = 0; ea_mode < 8; ea_mode++)
            {
                if (ea_mode == 1)
                {
                    continue;
                }
                if (ea_mode == 0)
                {
                    i = new AnonymousInstruction(this);
                }
                else
                {
                    i = new AnonymousInstruction1(this);
                }

                for (int ea_reg = 0; ea_reg < 8; ea_reg++)
                {
                    if (ea_mode == 7 && ea_reg > 1)
                    {
                        break;
                    }
                    for (int r = 0; r < 8; r++)
                    {
                        instructionSet.AddInstruction(baseAddress + (r << 9) + (ea_mode << 3) + ea_reg, i);
                    }
                }
            }

            baseAddress = 0x08c0;
            for (int ea_mode = 0; ea_mode < 8; ea_mode++)
            {
                if (ea_mode == 1)
                {
                    continue;
                }
                if (ea_mode == 0)
                {
                    i = new AnonymousInstruction2(this);
                }
                else
                {
                    i = new AnonymousInstruction3(this);
                }

                for (int ea_reg = 0; ea_reg < 8; ea_reg++)
                {
                    if (ea_mode == 7 && ea_reg > 1)
                    {
                        break;
                    }
                    instructionSet.AddInstruction(baseAddress + (ea_mode << 3) + ea_reg, i);
                }
            }
        }
예제 #2
0
        public void Register(IInstructionSet instructionSet)
        {
            int          baseAddress;
            IInstruction i;

            for (int sz = 0; sz < 3; sz++)
            {
                if (sz == 0)
                {
                    baseAddress = 0x9100;
                    i           = new AnonymousInstruction(this);
                }
                else if (sz == 1)
                {
                    baseAddress = 0x9140;
                    i           = new AnonymousInstruction1(this);
                }
                else
                {
                    baseAddress = 0x9180;
                    i           = new AnonymousInstruction2(this);
                }

                for (int regx = 0; regx < 8; regx++)
                {
                    for (int regy = 0; regy < 8; regy++)
                    {
                        instructionSet.AddInstruction(baseAddress + (regx << 9) + regy, i);
                    }
                }
            }

            for (int sz = 0; sz < 3; sz++)
            {
                if (sz == 0)
                {
                    baseAddress = 0x9108;
                    i           = new AnonymousInstruction3(this);
                }
                else if (sz == 1)
                {
                    baseAddress = 0x9148;
                    i           = new AnonymousInstruction4(this);
                }
                else
                {
                    baseAddress = 0x9188;
                    i           = new AnonymousInstruction5(this);
                }

                for (int regx = 0; regx < 8; regx++)
                {
                    for (int regy = 0; regy < 8; regy++)
                    {
                        instructionSet.AddInstruction(baseAddress + (regx << 9) + regy, i);
                    }
                }
            }
        }
예제 #3
0
        public void Register(IInstructionSet instructionSet)
        {
            if (instructionSet is null)
            {
                throw new System.ArgumentNullException(nameof(instructionSet));
            }

            int          baseAddress;
            IInstruction i;

            for (int sz = 0; sz < 2; sz++)
            {
                if (sz == 0)
                {
                    baseAddress = 0x0188;
                    i           = new AnonymousInstruction(this);
                }
                else
                {
                    baseAddress = 0x01c8;
                    i           = new AnonymousInstruction1(this);
                }

                for (int dreg = 0; dreg < 8; dreg++)
                {
                    for (int areg = 0; areg < 8; areg++)
                    {
                        instructionSet.AddInstruction(baseAddress + (dreg << 9) + areg, i);
                    }
                }
            }

            for (int sz = 0; sz < 2; sz++)
            {
                if (sz == 0)
                {
                    baseAddress = 0x0108;
                    i           = new AnonymousInstruction2(this);
                }
                else
                {
                    baseAddress = 0x0148;
                    i           = new AnonymousInstruction3(this);
                }

                for (int dreg = 0; dreg < 8; dreg++)
                {
                    for (int areg = 0; areg < 8; areg++)
                    {
                        instructionSet.AddInstruction(baseAddress + (dreg << 9) + areg, i);
                    }
                }
            }
        }
예제 #4
0
        public void Register(IInstructionSet instructionSet)
        {
            if (instructionSet is null)
            {
                throw new System.ArgumentNullException(nameof(instructionSet));
            }

            int          baseNumber;
            IInstruction i;

            for (int f = 0; f < 2; f++)
            {
                if (f == 0)
                {
                    baseNumber = 0xc100;
                    i          = new ABCDData(this);
                }
                else
                {
                    baseNumber = 0xc108;
                    i          = new ABCDReg(this);
                }

                for (int d = 0; d < 8; d++)
                {
                    for (int s = 0; s < 8; s++)
                    {
                        instructionSet.AddInstruction(baseNumber + (d << 9) + s, i);
                    }
                }
            }
        }
예제 #5
0
파일: EXG.cs 프로젝트: maximilien-noal/m68k
        public void Register(IInstructionSet instructionSet)
        {
            int          baseAddress;
            IInstruction i;

            for (int mode = 0; mode < 3; mode++)
            {
                if (mode == 0)
                {
                    baseAddress = 0xc140;
                    i           = new AnonymousInstruction(this);
                }
                else if (mode == 1)
                {
                    baseAddress = 0xc148;
                    i           = new AnonymousInstruction1(this);
                }
                else
                {
                    baseAddress = 0xc188;
                    i           = new AnonymousInstruction2(this);
                }

                for (int rx = 0; rx < 8; rx++)
                {
                    for (int ry = 0; ry < 8; ry++)
                    {
                        instructionSet.AddInstruction(baseAddress + (rx << 9) + ry, i);
                    }
                }
            }
        }
예제 #6
0
        public void Register(IInstructionSet instructionSet)
        {
            int          baseAddress;
            IInstruction i;

            for (int sz = 0; sz < 3; sz++)
            {
                if (sz == 0)
                {
                    baseAddress = 0xb108;
                    i           = new AnonymousInstruction(this);
                }
                else if (sz == 1)
                {
                    baseAddress = 0xb148;
                    i           = new AnonymousInstruction1(this);
                }
                else
                {
                    baseAddress = 0xb188;
                    i           = new AnonymousInstruction2(this);
                }

                for (int ax = 0; ax < 8; ax++)
                {
                    for (int ay = 0; ay < 8; ay++)
                    {
                        instructionSet.AddInstruction(baseAddress + (ax << 9) + ay, i);
                    }
                }
            }
        }
예제 #7
0
        public void Register(IInstructionSet instructionSet)
        {
            int          baseAddress;
            IInstruction i;

            for (int sz = 0; sz < 2; sz++)
            {
                if (sz == 0)
                {
                    baseAddress = 0x3040;
                    i           = new AnonymousInstruction(this);
                }
                else
                {
                    baseAddress = 0x2040;
                    i           = new AnonymousInstruction1(this);
                }

                for (int ea_mode = 0; ea_mode < 8; ea_mode++)
                {
                    for (int ea_reg = 0; ea_reg < 8; ea_reg++)
                    {
                        if (ea_mode == 7 && ea_reg > 4)
                        {
                            break;
                        }
                        for (int r = 0; r < 8; r++)
                        {
                            instructionSet.AddInstruction(baseAddress + (r << 9) + (ea_mode << 3) + ea_reg, i);
                        }
                    }
                }
            }
        }
예제 #8
0
        public void Register(IInstructionSet instructionSet)
        {
            if (instructionSet is null)
            {
                throw new System.ArgumentNullException(nameof(instructionSet));
            }

            int          baseAddress;
            IInstruction i;

            for (int t = 0; t < 2; t++)
            {
                if (t == 0)
                {
                    baseAddress = 0x4e60;
                    i           = new AnonymousInstruction(this);
                }
                else
                {
                    baseAddress = 0x4e68;
                    i           = new AnonymousInstruction1(this);
                }

                for (int reg = 0; reg < 8; reg++)
                {
                    instructionSet.AddInstruction(baseAddress + reg, i);
                }
            }
        }
예제 #9
0
        public void Register(IInstructionSet instructionSet)
        {
            if (instructionSet is null)
            {
                throw new System.ArgumentNullException(nameof(instructionSet));
            }

            int          baseAddress = 0x40c0;
            IInstruction i           = new AnonymousInstruction(this);

            for (int ea_mode = 0; ea_mode < 8; ea_mode++)
            {
                if (ea_mode == 1)
                {
                    continue;
                }
                for (int ea_reg = 0; ea_reg < 8; ea_reg++)
                {
                    if (ea_mode == 7 && ea_reg > 1)
                    {
                        break;
                    }
                    instructionSet.AddInstruction(baseAddress + (ea_mode << 3) + ea_reg, i);
                }
            }
        }
예제 #10
0
        public void Register(IInstructionSet instructionSet)
        {
            int          baseAddress;
            IInstruction i;

            for (int f = 0; f < 2; f++)
            {
                if (f == 0)
                {
                    baseAddress = 0x8100;
                    i           = new AnonymousInstruction(this);
                }
                else
                {
                    baseAddress = 0x8108;
                    i           = new AnonymousInstruction1(this);
                }

                for (int d = 0; d < 8; d++)
                {
                    for (int s = 0; s < 8; s++)
                    {
                        instructionSet.AddInstruction(baseAddress + (d << 9) + s, i);
                    }
                }
            }
        }
예제 #11
0
파일: RTR.cs 프로젝트: maximilien-noal/m68k
        public void Register(IInstructionSet instructionSet)
        {
            if (instructionSet is null)
            {
                throw new System.ArgumentNullException(nameof(instructionSet));
            }

            instructionSet.AddInstruction(0x4e77, new AnonymousInstruction(this));
        }
예제 #12
0
        public void Register(IInstructionSet instructionSet)
        {
            int          baseAddress;
            IInstruction i;

            baseAddress = 0x007c;
            i           = new AnonymousInstruction(this);
            instructionSet.AddInstruction(baseAddress, i);
        }
예제 #13
0
        public void Register(IInstructionSet instructionSet)
        {
            int          baseAddress = 0x4e50;
            IInstruction i           = new AnonymousInstruction(this);

            for (int reg = 0; reg < 8; reg++)
            {
                instructionSet.AddInstruction(baseAddress + reg, i);
            }
        }
예제 #14
0
파일: Bcc.cs 프로젝트: maximilien-noal/m68k
        public void Register(IInstructionSet instructionSet)
        {
            if (instructionSet is null)
            {
                throw new System.ArgumentNullException(nameof(instructionSet));
            }

            int          baseAddress = 0x6000;
            IInstruction ib          = new AnonymousInstruction(this);
            IInstruction iw          = new AnonymousInstruction1(this);

            for (int cc = 0; cc < 16; cc++)
            {
                instructionSet.AddInstruction(baseAddress + (cc << 8), iw);
                for (int dis = 1; dis < 256; dis++)
                {
                    instructionSet.AddInstruction(baseAddress + (cc << 8) + dis, ib);
                }
            }
        }
예제 #15
0
        public void Register(IInstructionSet instructionSet)
        {
            int          baseAddress = 0x7000;
            IInstruction i           = new AnonymousInstruction(this);

            for (int reg = 0; reg < 8; reg++)
            {
                for (int imm = 0; imm < 256; imm++)
                {
                    instructionSet.AddInstruction(baseAddress + (reg << 9) + imm, i);
                }
            }
        }
예제 #16
0
        public void Register(IInstructionSet instructionSet)
        {
            if (instructionSet is null)
            {
                throw new ArgumentNullException(nameof(instructionSet));
            }

            int          baseAddress;
            IInstruction i;

            baseAddress = 0x023c;
            i           = new AnonymousInstruction(this);
            instructionSet.AddInstruction(baseAddress, i);
        }
예제 #17
0
        public void Register(IInstructionSet instructionSet)
        {
            int          baseAddress;
            IInstruction i;

            for (int sz = 0; sz < 3; sz++)
            {
                if (sz == 0)
                {
                    baseAddress = 0x1000;
                    i           = new AnonymousInstruction(this);
                }
                else if (sz == 1)
                {
                    baseAddress = 0x3000;
                    i           = new AnonymousInstruction1(this);
                }
                else
                {
                    baseAddress = 0x2000;
                    i           = new AnonymousInstruction2(this);
                }

                for (int sea_mode = 0; sea_mode < 8; sea_mode++)
                {
                    for (int sea_reg = 0; sea_reg < 8; sea_reg++)
                    {
                        if (sea_mode == 7 && sea_reg > 4)
                        {
                            break;
                        }
                        for (int dea_mode = 0; dea_mode < 8; dea_mode++)
                        {
                            if (dea_mode == 1)
                            {
                                continue;
                            }
                            for (int dea_reg = 0; dea_reg < 8; dea_reg++)
                            {
                                if (dea_mode == 7 && dea_reg > 1)
                                {
                                    break;
                                }
                                instructionSet.AddInstruction(baseAddress + (dea_reg << 9) + (dea_mode << 6) + (sea_mode << 3) + sea_reg, i);
                            }
                        }
                    }
                }
            }
        }
예제 #18
0
        public void Register(IInstructionSet instructionSet)
        {
            if (instructionSet is null)
            {
                throw new System.ArgumentNullException(nameof(instructionSet));
            }

            int          baseAddress = 0x4840;
            IInstruction i           = new AnonymousInstruction(this);

            for (int reg = 0; reg < 8; reg++)
            {
                instructionSet.AddInstruction(baseAddress + reg, i);
            }
        }
예제 #19
0
        public void Register(IInstructionSet instructionSet)
        {
            if (instructionSet is null)
            {
                throw new ArgumentNullException(nameof(instructionSet));
            }

            int          baseAddress = 0x4e40;
            IInstruction i           = new AnonymousInstruction(this);

            for (int v = 0; v < 16; v++)
            {
                instructionSet.AddInstruction(baseAddress + v, i);
            }
        }
예제 #20
0
        public void Register(IInstructionSet instructionSet)
        {
            if (instructionSet is null)
            {
                throw new System.ArgumentNullException(nameof(instructionSet));
            }

            int          baseAddress;
            IInstruction i;

            for (int sz = 0; sz < 3; sz++)
            {
                if (sz == 0)
                {
                    baseAddress = 0x5000;
                    i           = new AnonymousInstruction(this);
                }
                else if (sz == 1)
                {
                    baseAddress = 0x5040;
                    i           = new AnonymousInstruction1(this);
                }
                else
                {
                    baseAddress = 0x5080;
                    i           = new AnonymousInstruction2(this);
                }

                for (int ea_mode = 0; ea_mode < 8; ea_mode++)
                {
                    if (sz == 0 && ea_mode == 1)
                    {
                        continue;
                    }
                    for (int ea_reg = 0; ea_reg < 8; ea_reg++)
                    {
                        if (ea_mode == 7 && ea_reg > 1)
                        {
                            break;
                        }
                        for (int imm = 0; imm < 8; imm++)
                        {
                            instructionSet.AddInstruction(baseAddress + (imm << 9) + (ea_mode << 3) + ea_reg, i);
                        }
                    }
                }
            }
        }
예제 #21
0
        public void Register(IInstructionSet instructionSet)
        {
            if (instructionSet is null)
            {
                throw new ArgumentNullException(nameof(instructionSet));
            }

            int          baseAddress;
            IInstruction i;

            for (int sz = 0; sz < 3; sz++)
            {
                if (sz == 0)
                {
                    baseAddress = 0x0a00;
                    i           = new AnonymousInstruction(this);
                }
                else if (sz == 1)
                {
                    baseAddress = 0x0a40;
                    i           = new AnonymousInstruction1(this);
                }
                else
                {
                    baseAddress = 0x0a80;
                    i           = new AnonymousInstruction2(this);
                }

                for (int ea_mode = 0; ea_mode < 8; ea_mode++)
                {
                    if (ea_mode == 1)
                    {
                        continue;
                    }
                    for (int ea_reg = 0; ea_reg < 8; ea_reg++)
                    {
                        if (ea_mode == 7 && (ea_reg == 2 || ea_reg == 3 || ea_reg == 4))
                        {
                            continue;
                        }
                        instructionSet.AddInstruction(baseAddress + (ea_mode << 3) + ea_reg, i);
                    }
                }
            }
        }
예제 #22
0
        public void Register(IInstructionSet instructionSet)
        {
            if (instructionSet is null)
            {
                throw new System.ArgumentNullException(nameof(instructionSet));
            }

            int          baseAddress = 0x50c8;
            IInstruction i           = new AnonymousInstruction(this);

            for (int cc = 0; cc < 16; cc++)
            {
                for (int r = 0; r < 8; r++)
                {
                    instructionSet.AddInstruction(baseAddress + (cc << 8) + r, i);
                }
            }
        }
예제 #23
0
파일: EOR.cs 프로젝트: maximilien-noal/m68k
        public void Register(IInstructionSet instructionSet)
        {
            int          baseAddress;
            IInstruction i;

            for (int sz = 0; sz < 3; sz++)
            {
                if (sz == 0)
                {
                    baseAddress = 0xb100;
                    i           = new AnonymousInstruction(this);
                }
                else if (sz == 1)
                {
                    baseAddress = 0xb140;
                    i           = new AnonymousInstruction1(this);
                }
                else
                {
                    baseAddress = 0xb180;
                    i           = new AnonymousInstruction2(this);
                }

                for (int reg = 0; reg < 8; reg++)
                {
                    for (int ea_mode = 0; ea_mode < 8; ea_mode++)
                    {
                        if (ea_mode == 1)
                        {
                            continue;
                        }
                        for (int ea_reg = 0; ea_reg < 8; ea_reg++)
                        {
                            if (ea_mode == 7 && ea_reg > 1)
                            {
                                break;
                            }
                            instructionSet.AddInstruction(baseAddress + (reg << 9) + (ea_mode << 3) + ea_reg, i);
                        }
                    }
                }
            }
        }
예제 #24
0
        public void Register(IInstructionSet instructionSet)
        {
            int          baseAddress = 0x4ec0;
            IInstruction i           = new AnonymousInstruction(this);

            for (int ea_mode = 2; ea_mode < 8; ea_mode++)
            {
                if (ea_mode == 3 || ea_mode == 4)
                {
                    continue;
                }
                for (int ea_reg = 0; ea_reg < 8; ea_reg++)
                {
                    if (ea_mode == 7 && ea_reg > 3)
                    {
                        break;
                    }
                    instructionSet.AddInstruction(baseAddress + (ea_mode << 3) + ea_reg, i);
                }
            }
        }
예제 #25
0
        public void Register(IInstructionSet instructionSet)
        {
            int          baseAddress;
            IInstruction i;

            for (int sz = 0; sz < 3; sz++)
            {
                if (sz == 0)
                {
                    baseAddress = 0x0000;
                    i           = new AnonymousInstruction(this);
                }
                else if (sz == 1)
                {
                    baseAddress = 0x0040;
                    i           = new AnonymousInstruction1(this);
                }
                else
                {
                    baseAddress = 0x0080;
                    i           = new AnonymousInstruction2(this);
                }

                for (int ea_mode = 0; ea_mode < 8; ea_mode++)
                {
                    if (ea_mode == 1)
                    {
                        continue;
                    }
                    for (int ea_reg = 0; ea_reg < 8; ea_reg++)
                    {
                        if (ea_mode == 7 && (ea_reg == 2 || ea_reg == 3 || ea_reg == 4))
                        {
                            continue;
                        }
                        instructionSet.AddInstruction(baseAddress + (ea_mode << 3) + ea_reg, i);
                    }
                }
            }
        }
예제 #26
0
        public void Register(IInstructionSet instructionSet)
        {
            if (instructionSet is null)
            {
                throw new System.ArgumentNullException(nameof(instructionSet));
            }

            int          baseAddress;
            IInstruction i;

            for (int sz = 0; sz < 2; sz++)
            {
                if (sz == 0)
                {
                    baseAddress = 0xd0c0;
                    i           = new AnonymousInstruction(this);
                }
                else
                {
                    baseAddress = 0xd1c0;
                    i           = new AnonymousInstruction1(this);
                }

                for (int reg = 0; reg < 8; reg++)
                {
                    for (int ea_mode = 0; ea_mode < 8; ea_mode++)
                    {
                        for (int ea_reg = 0; ea_reg < 8; ea_reg++)
                        {
                            if (ea_mode == 7 && ea_reg > 4)
                            {
                                break;
                            }
                            instructionSet.AddInstruction(baseAddress + (reg << 9) + (ea_mode << 3) + ea_reg, i);
                        }
                    }
                }
            }
        }
예제 #27
0
        public void Register(IInstructionSet instructionSet)
        {
            int          baseAddress = 0x50c0;
            IInstruction i           = new AnonymousInstruction(this);

            for (int ea_mode = 0; ea_mode < 8; ea_mode++)
            {
                if (ea_mode == 1)
                {
                    continue;
                }
                for (int ea_reg = 0; ea_reg < 8; ea_reg++)
                {
                    if (ea_mode == 7 && ea_reg > 1)
                    {
                        break;
                    }
                    for (int cc = 0; cc < 16; cc++)
                    {
                        instructionSet.AddInstruction(baseAddress + (cc << 8) + (ea_mode << 3) + ea_reg, i);
                    }
                }
            }
        }
예제 #28
0
파일: EXT.cs 프로젝트: maximilien-noal/m68k
        public void Register(IInstructionSet instructionSet)
        {
            int          baseAddress;
            IInstruction i;

            for (int sz = 0; sz < 2; sz++)
            {
                if (sz == 0)
                {
                    baseAddress = 0x4880;
                    i           = new AnonymousInstruction(this);
                }
                else
                {
                    baseAddress = 0x48c0;
                    i           = new AnonymousInstruction1(this);
                }

                for (int reg = 0; reg < 8; reg++)
                {
                    instructionSet.AddInstruction(baseAddress + reg, i);
                }
            }
        }
예제 #29
0
        public void Register(IInstructionSet instructionSet)
        {
            int          baseAddress = 0x4180;
            IInstruction i           = new AnonymousInstruction(this);

            for (int ea_mode = 0; ea_mode < 8; ea_mode++)
            {
                if (ea_mode == 1)
                {
                    continue;
                }
                for (int ea_reg = 0; ea_reg < 8; ea_reg++)
                {
                    if (ea_mode == 7 && ea_reg > 4)
                    {
                        break;
                    }
                    for (int r = 0; r < 8; r++)
                    {
                        instructionSet.AddInstruction(baseAddress + (r << 9) + (ea_mode << 3) + ea_reg, i);
                    }
                }
            }
        }
예제 #30
0
        public void Register(IInstructionSet instructionSet)
        {
            int          baseAddress;
            IInstruction i;

            for (int sz = 0; sz < 3; sz++)
            {
                if (sz == 0)
                {
                    baseAddress = 0xe100;
                    i           = new AnonymousInstruction(this);
                }
                else if (sz == 1)
                {
                    baseAddress = 0xe140;
                    i           = new AnonymousInstruction1(this);
                }
                else
                {
                    baseAddress = 0xe180;
                    i           = new AnonymousInstruction2(this);
                }

                for (int imm = 0; imm < 8; imm++)
                {
                    for (int reg = 0; reg < 8; reg++)
                    {
                        instructionSet.AddInstruction(baseAddress + (imm << 9) + reg, i);
                    }
                }
            }

            for (int sz = 0; sz < 3; sz++)
            {
                if (sz == 0)
                {
                    baseAddress = 0xe120;
                    i           = new AnonymousInstruction3(this);
                }
                else if (sz == 1)
                {
                    baseAddress = 0xe160;
                    i           = new AnonymousInstruction4(this);
                }
                else
                {
                    baseAddress = 0xe1a0;
                    i           = new AnonymousInstruction5(this);
                }

                for (int imm = 0; imm < 8; imm++)
                {
                    for (int reg = 0; reg < 8; reg++)
                    {
                        instructionSet.AddInstruction(baseAddress + (imm << 9) + reg, i);
                    }
                }
            }

            baseAddress = 0xe1c0;
            i           = new AnonymousInstruction6(this);
            for (int ea_mode = 2; ea_mode < 8; ea_mode++)
            {
                for (int ea_reg = 0; ea_reg < 8; ea_reg++)
                {
                    if (ea_mode == 7 && ea_reg > 1)
                    {
                        break;
                    }
                    instructionSet.AddInstruction(baseAddress + (ea_mode << 3) + ea_reg, i);
                }
            }
        }