Esempio n. 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);
                }
            }
        }
Esempio n. 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);
                    }
                }
            }
        }
Esempio n. 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);
                    }
                }
            }
        }
Esempio n. 4
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);
                }
            }
        }
Esempio n. 5
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 = 0xd100;
                    i           = new AnonymousInstruction(this);
                }
                else if (sz == 1)
                {
                    baseAddress = 0xd140;
                    i           = new AnonymousInstruction1(this);
                }
                else
                {
                    baseAddress = 0xd180;
                    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 = 0xd108;
                    i           = new AnonymousInstruction3(this);
                }
                else if (sz == 1)
                {
                    baseAddress = 0xd148;
                    i           = new AnonymousInstruction4(this);
                }
                else
                {
                    baseAddress = 0xd188;
                    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);
                    }
                }
            }
        }
Esempio n. 6
0
        public void Register(IInstructionSet instructionSet)
        {
            int          baseAddress;
            IInstruction i;

            for (int sz = 0; sz < 3; sz++)
            {
                if (sz == 0)
                {
                    baseAddress = 0x9000;
                    i           = new AnonymousInstruction(this);
                }
                else if (sz == 1)
                {
                    baseAddress = 0x9040;
                    i           = new AnonymousInstruction1(this);
                }
                else
                {
                    baseAddress = 0x9080;
                    i           = new AnonymousInstruction2(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);
                        }
                    }
                }
            }

            for (int sz = 0; sz < 3; sz++)
            {
                if (sz == 0)
                {
                    baseAddress = 0x9100;
                    i           = new AnonymousInstruction3(this);
                }
                else if (sz == 1)
                {
                    baseAddress = 0x9140;
                    i           = new AnonymousInstruction4(this);
                }
                else
                {
                    baseAddress = 0x9180;
                    i           = new AnonymousInstruction5(this);
                }

                for (int reg = 0; reg < 8; reg++)
                {
                    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 + (reg << 9) + (ea_mode << 3) + ea_reg, i);
                        }
                    }
                }
            }
        }
Esempio n. 7
0
        public void Register(IInstructionSet instructionSet)
        {
            if (instructionSet is null)
            {
                throw new System.ArgumentNullException(nameof(instructionSet));
            }

            int          baseAddress = 0x0140;
            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 = 0x0840;
            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);
                }
            }
        }
Esempio n. 8
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 = 0xd000;
                    i           = new AnonymousInstruction(this);
                }
                else if (sz == 1)
                {
                    baseAddress = 0xd040;
                    i           = new AnonymousInstruction1(this);
                }
                else
                {
                    baseAddress = 0xd080;
                    i           = new AnonymousInstruction2(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);
                        }
                    }
                }
            }

            for (int sz = 0; sz < 3; sz++)
            {
                if (sz == 0)
                {
                    baseAddress = 0xd100;
                    i           = new AnonymousInstruction3(this);
                }
                else if (sz == 1)
                {
                    baseAddress = 0xd140;
                    i           = new AnonymousInstruction4(this);
                }
                else
                {
                    baseAddress = 0xd180;
                    i           = new AnonymousInstruction5(this);
                }

                for (int reg = 0; reg < 8; reg++)
                {
                    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 + (reg << 9) + (ea_mode << 3) + ea_reg, i);
                        }
                    }
                }
            }
        }
Esempio n. 9
0
        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 ea_mode = 2; ea_mode < 8; ea_mode++)
                {
                    if (ea_mode == 3)
                    {
                        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);
                    }
                }
            }

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

                for (int ea_mode = 2; ea_mode < 8; ea_mode++)
                {
                    if (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);
                    }
                }
            }
        }
Esempio n. 10
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 = 0xe108;
                    i           = new AnonymousInstruction(this);
                }
                else if (sz == 1)
                {
                    baseAddress = 0xe148;
                    i           = new AnonymousInstruction1(this);
                }
                else
                {
                    baseAddress = 0xe188;
                    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 = 0xe128;
                    i           = new AnonymousInstruction3(this);
                }
                else if (sz == 1)
                {
                    baseAddress = 0xe168;
                    i           = new AnonymousInstruction4(this);
                }
                else
                {
                    baseAddress = 0xe1a8;
                    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 = 0xe3c0;
            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);
                }
            }
        }