• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# M68000.DisassemblyInfo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中BizHawk.Emulation.Cores.Components.M68000.DisassemblyInfo的典型用法代码示例。如果您正苦于以下问题:C# DisassemblyInfo类的具体用法?C# DisassemblyInfo怎么用?C# DisassemblyInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DisassemblyInfo类属于BizHawk.Emulation.Cores.Components.M68000命名空间,在下文中一共展示了DisassemblyInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ANDI_SR_Disasm

		void ANDI_SR_Disasm(DisassemblyInfo info)
		{
			int pc = info.PC + 2;
			info.Mnemonic = "andi";
			info.Args = DisassembleImmediate(2, ref pc) + ", SR";
			info.Length = pc - info.PC;
		}
开发者ID:SaxxonPike,项目名称:BizHawk,代码行数:7,代码来源:Supervisor.cs


示例2: MOVE_Disasm

		void MOVE_Disasm(DisassemblyInfo info)
		{
			int pc = info.PC + 2;
			int size = ((op >> 12) & 0x03);
			int dstMode = ((op >> 6) & 0x07);
			int dstReg = ((op >> 9) & 0x07);
			int srcMode = ((op >> 3) & 0x07);
			int srcReg = (op & 0x07);

			switch (size)
			{
				case 1:
					info.Mnemonic = "move.b";
					info.Args = DisassembleValue(srcMode, srcReg, 1, ref pc) + ", ";
					info.Args += DisassembleValue(dstMode, dstReg, 1, ref pc);
					break;
				case 3:
					info.Mnemonic = "move.w";
					info.Args = DisassembleValue(srcMode, srcReg, 2, ref pc) + ", ";
					info.Args += DisassembleValue(dstMode, dstReg, 2, ref pc);
					break;
				case 2:
					info.Mnemonic = "move.l";
					info.Args = DisassembleValue(srcMode, srcReg, 4, ref pc) + ", ";
					info.Args += DisassembleValue(dstMode, dstReg, 4, ref pc);
					break;
			}

			info.Length = pc - info.PC;
		}
开发者ID:ddugovic,项目名称:RASuite,代码行数:30,代码来源:DataMovement.cs


示例3: AND0_Disasm

		void AND0_Disasm(DisassemblyInfo info)
		{
			int dstReg = (op >> 9) & 0x07;
			int size = (op >> 6) & 0x03;
			int srcMode = (op >> 3) & 0x07;
			int srcReg = op & 0x07;

			int pc = info.PC + 2;

			switch (size)
			{
				case 0: // Byte
					info.Mnemonic = "and.b";
					info.Args = string.Format("{0}, D{1}", DisassembleValue(srcMode, srcReg, 1, ref pc), dstReg);
					break;
				case 1: // Word
					info.Mnemonic = "and.w";
					info.Args = string.Format("{0}, D{1}", DisassembleValue(srcMode, srcReg, 2, ref pc), dstReg);
					break;
				case 2: // Long
					info.Mnemonic = "and.l";
					info.Args = string.Format("{0}, D{1}", DisassembleValue(srcMode, srcReg, 4, ref pc), dstReg);
					break;
			}

			info.Length = pc - info.PC;
		}
开发者ID:henke37,项目名称:BizHawk,代码行数:27,代码来源:BitArithemetic.cs


示例4: MOVEUSP_Disasm

		void MOVEUSP_Disasm(DisassemblyInfo info)
		{
			int pc = info.PC + 2;
			int dir = (op >> 3) & 1;
			int reg = op & 7;
			info.Mnemonic = "move";
			info.Args = (dir == 0) ? ("A" + reg + ", USP") : ("USP, A" + reg);
			info.Length = pc - info.PC;
		}
开发者ID:SaxxonPike,项目名称:BizHawk,代码行数:9,代码来源:Supervisor.cs


示例5: MOVEfSR_Disasm

		void MOVEfSR_Disasm(DisassemblyInfo info)
		{
			int pc = info.PC + 2;
			int mode = (op >> 3) & 7;
			int reg = (op >> 0) & 7;
			info.Mnemonic = "move";
			info.Args = "SR, " + DisassembleValue(mode, reg, 2, ref pc);
			info.Length = pc - info.PC;
		}
开发者ID:SaxxonPike,项目名称:BizHawk,代码行数:9,代码来源:Supervisor.cs


示例6: ANDI_Disasm

		void ANDI_Disasm(DisassemblyInfo info)
		{
			int size = ((op >> 6) & 0x03);
			int dstMode = ((op >> 3) & 0x07);
			int dstReg = (op & 0x07);

			int pc = info.PC + 2;

			switch (size)
			{
				case 0: // Byte
					{
						info.Mnemonic = "andi.b";
						sbyte imm = (sbyte)ReadWord(pc); pc += 2;
						info.Args = string.Format("${0:X}, ", imm);
						info.Args += DisassembleValue(dstMode, dstReg, 1, ref pc);
						break;
					}
				case 1: // Word
					{
						info.Mnemonic = "andi.w";
						short imm = ReadWord(pc); pc += 2;
						info.Args = string.Format("${0:X}, ", imm);
						info.Args += DisassembleValue(dstMode, dstReg, 2, ref pc);
						break;
					}
				case 2: // Long
					{
						info.Mnemonic = "andi.l";
						int imm = ReadLong(pc); pc += 4;
						info.Args = string.Format("${0:X}, ", imm);
						info.Args += DisassembleValue(dstMode, dstReg, 4, ref pc);
						break;
					}
			}

			info.Length = pc - info.PC;
		}
开发者ID:henke37,项目名称:BizHawk,代码行数:38,代码来源:BitArithemetic.cs


示例7: Disassemble

		public DisassemblyInfo Disassemble(int pc)
		{
			var info = new DisassemblyInfo { Mnemonic = "UNKNOWN", PC = pc, Length = 2 };
			op = (ushort)ReadWord(pc);

			if (Opcodes[op] == MOVE) MOVE_Disasm(info);
			else if (Opcodes[op] == MOVEA) MOVEA_Disasm(info);
			else if (Opcodes[op] == MOVEQ) MOVEQ_Disasm(info);
			else if (Opcodes[op] == MOVEM0) MOVEM0_Disasm(info);
			else if (Opcodes[op] == MOVEM1) MOVEM1_Disasm(info);
			else if (Opcodes[op] == LEA) LEA_Disasm(info);
			else if (Opcodes[op] == CLR) CLR_Disasm(info);
			else if (Opcodes[op] == EXT) EXT_Disasm(info);
			else if (Opcodes[op] == PEA) PEA_Disasm(info);

			else if (Opcodes[op] == ANDI) ANDI_Disasm(info);
			else if (Opcodes[op] == EORI) EORI_Disasm(info);
			else if (Opcodes[op] == ORI) ORI_Disasm(info);
			else if (Opcodes[op] == ASLd) ASLd_Disasm(info);
			else if (Opcodes[op] == ASRd) ASRd_Disasm(info);
			else if (Opcodes[op] == LSLd) LSLd_Disasm(info);
			else if (Opcodes[op] == LSRd) LSRd_Disasm(info);
			else if (Opcodes[op] == ROXLd) ROXLd_Disasm(info);
			else if (Opcodes[op] == ROXRd) ROXRd_Disasm(info);
			else if (Opcodes[op] == ROLd) ROLd_Disasm(info);
			else if (Opcodes[op] == RORd) RORd_Disasm(info);
			else if (Opcodes[op] == SWAP) SWAP_Disasm(info);
			else if (Opcodes[op] == AND0) AND0_Disasm(info);
			else if (Opcodes[op] == AND1) AND1_Disasm(info);
			else if (Opcodes[op] == EOR) EOR_Disasm(info);
			else if (Opcodes[op] == OR0) OR0_Disasm(info);
			else if (Opcodes[op] == OR1) OR1_Disasm(info);
			else if (Opcodes[op] == NOT) NOT_Disasm(info);
			else if (Opcodes[op] == NEG) NEG_Disasm(info);

			else if (Opcodes[op] == JMP) JMP_Disasm(info);
			else if (Opcodes[op] == JSR) JSR_Disasm(info);
			else if (Opcodes[op] == Bcc) Bcc_Disasm(info);
			else if (Opcodes[op] == BRA) BRA_Disasm(info);
			else if (Opcodes[op] == BSR) BSR_Disasm(info);
			else if (Opcodes[op] == DBcc) DBcc_Disasm(info);
			else if (Opcodes[op] == Scc) Scc_Disasm(info);
			else if (Opcodes[op] == RTE) RTE_Disasm(info);
			else if (Opcodes[op] == RTS) RTS_Disasm(info);
			else if (Opcodes[op] == RTR) RTR_Disasm(info);
			else if (Opcodes[op] == TST) TST_Disasm(info);
			else if (Opcodes[op] == BTSTi) BTSTi_Disasm(info);
			else if (Opcodes[op] == BTSTr) BTSTr_Disasm(info);
			else if (Opcodes[op] == BCHGi) BCHGi_Disasm(info);
			else if (Opcodes[op] == BCHGr) BCHGr_Disasm(info);
			else if (Opcodes[op] == BCLRi) BCLRi_Disasm(info);
			else if (Opcodes[op] == BCLRr) BCLRr_Disasm(info);
			else if (Opcodes[op] == BSETi) BSETi_Disasm(info);
			else if (Opcodes[op] == BSETr) BSETr_Disasm(info);
			else if (Opcodes[op] == LINK) LINK_Disasm(info);
			else if (Opcodes[op] == UNLK) UNLK_Disasm(info);
			else if (Opcodes[op] == NOP) NOP_Disasm(info);

			else if (Opcodes[op] == ADD0) ADD_Disasm(info);
			else if (Opcodes[op] == ADD1) ADD_Disasm(info);
			else if (Opcodes[op] == ADDA) ADDA_Disasm(info);
			else if (Opcodes[op] == ADDI) ADDI_Disasm(info);
			else if (Opcodes[op] == ADDQ) ADDQ_Disasm(info);
			else if (Opcodes[op] == SUB0) SUB_Disasm(info);
			else if (Opcodes[op] == SUB1) SUB_Disasm(info);
			else if (Opcodes[op] == SUBA) SUBA_Disasm(info);
			else if (Opcodes[op] == SUBI) SUBI_Disasm(info);
			else if (Opcodes[op] == SUBQ) SUBQ_Disasm(info);
			else if (Opcodes[op] == CMP) CMP_Disasm(info);
			else if (Opcodes[op] == CMPM) CMPM_Disasm(info);
			else if (Opcodes[op] == CMPA) CMPA_Disasm(info);

			else if (Opcodes[op] == CMPI) CMPI_Disasm(info);
			else if (Opcodes[op] == MULU) MULU_Disasm(info);
			else if (Opcodes[op] == MULS) MULS_Disasm(info);
			else if (Opcodes[op] == DIVU) DIVU_Disasm(info);
			else if (Opcodes[op] == DIVS) DIVS_Disasm(info);

			else if (Opcodes[op] == MOVEtSR) MOVEtSR_Disasm(info);
			else if (Opcodes[op] == MOVEfSR) MOVEfSR_Disasm(info);
			else if (Opcodes[op] == MOVEUSP) MOVEUSP_Disasm(info);
			else if (Opcodes[op] == ANDI_SR) ANDI_SR_Disasm(info);
			else if (Opcodes[op] == EORI_SR) EORI_SR_Disasm(info);
			else if (Opcodes[op] == ORI_SR) ORI_SR_Disasm(info);
			else if (Opcodes[op] == MOVECCR) MOVECCR_Disasm(info);
			else if (Opcodes[op] == TRAP) TRAP_Disasm(info);

			var sb = new StringBuilder();
			for (int p = info.PC; p < info.PC + info.Length; p++)
				sb.AppendFormat("{0:X2}", ReadByte(p));
			info.RawBytes = sb.ToString();

			return info;
		}
开发者ID:ddugovic,项目名称:RASuite,代码行数:94,代码来源:Diassembler.cs


示例8: SWAP_Disasm

		void SWAP_Disasm(DisassemblyInfo info)
		{
			int reg = op & 7;
			info.Mnemonic = "swap";
			info.Args = "D" + reg;
		}
开发者ID:henke37,项目名称:BizHawk,代码行数:6,代码来源:BitArithemetic.cs


示例9: BSR_Disasm

		void BSR_Disasm(DisassemblyInfo info)
		{
			int pc = info.PC + 2;
			info.Mnemonic = "bsr";

			sbyte displacement8 = (sbyte)op;
			if (displacement8 != 0)
				info.Args = String.Format("${0:X}", pc + displacement8);
			else
			{
				info.Args = String.Format("${0:X}", pc + ReadWord(pc));
				pc += 2;
			}
			info.Length = pc - info.PC;
		}
开发者ID:SaxxonPike,项目名称:BizHawk,代码行数:15,代码来源:ProgramFlow.cs


示例10: Bcc_Disasm

		void Bcc_Disasm(DisassemblyInfo info)
		{
			int pc = info.PC + 2;
			sbyte displacement8 = (sbyte)op;
			int cond = (op >> 8) & 0x0F;

			info.Mnemonic = "b" + DisassembleCondition(cond);
			if (displacement8 != 0)
			{
				info.Args = string.Format("${0:X}", pc + displacement8);
			}
			else
			{
				info.Args = string.Format("${0:X}", pc + ReadWord(pc));
				pc += 2;
			}
			info.Length = pc - info.PC;
		}
开发者ID:SaxxonPike,项目名称:BizHawk,代码行数:18,代码来源:ProgramFlow.cs


示例11: NOT_Disasm

		void NOT_Disasm(DisassemblyInfo info)
		{
			int size = (op >> 6) & 0x03;
			int mode = (op >> 3) & 0x07;
			int reg = op & 0x07;

			int pc = info.PC + 2;

			switch (size)
			{
				case 0: // Byte
					info.Mnemonic = "not.b";
					info.Args = DisassembleValue(mode, reg, 1, ref pc);
					break;
				case 1: // Word
					info.Mnemonic = "not.w";
					info.Args = DisassembleValue(mode, reg, 2, ref pc);
					break;
				case 2: // Long
					info.Mnemonic = "not.l";
					info.Args = DisassembleValue(mode, reg, 4, ref pc);
					break;
			}

			info.Length = pc - info.PC;
		}
开发者ID:henke37,项目名称:BizHawk,代码行数:26,代码来源:BitArithemetic.cs


示例12: TRAP_Disasm

		void TRAP_Disasm(DisassemblyInfo info)
		{
			info.Mnemonic = "trap";
			info.Args = string.Format("#${0:X}", op & 0xF);
		}
开发者ID:SaxxonPike,项目名称:BizHawk,代码行数:5,代码来源:Supervisor.cs


示例13: JSR_Disasm

		void JSR_Disasm(DisassemblyInfo info)
		{
			int pc = info.PC + 2;
			int mode = (op >> 3) & 7;
			int reg = (op >> 0) & 7;
			info.Mnemonic = "jsr";
			info.Args = DisassembleAddress(mode, reg, ref pc);
			info.Length = pc - info.PC;
		}
开发者ID:SaxxonPike,项目名称:BizHawk,代码行数:9,代码来源:ProgramFlow.cs


示例14: LINK_Disasm

		void LINK_Disasm(DisassemblyInfo info)
		{
			int pc = info.PC + 2;
			int reg = op & 7;
			info.Mnemonic = "link";
			info.Args = "A" + reg + ", " + DisassembleImmediate(2, ref pc); // TODO need a DisassembleSigned or something
			info.Length = pc - info.PC;
		}
开发者ID:SaxxonPike,项目名称:BizHawk,代码行数:8,代码来源:ProgramFlow.cs


示例15: BSETr_Disasm

		void BSETr_Disasm(DisassemblyInfo info)
		{
			int pc = info.PC + 2;
			int dReg = (op >> 9) & 7;
			int mode = (op >> 3) & 7;
			int reg = op & 7;

			info.Mnemonic = "bset";
			info.Args = String.Format("D{0}, {1}", dReg, DisassembleValue(mode, reg, 1, ref pc));
			info.Length = pc - info.PC;
		}
开发者ID:SaxxonPike,项目名称:BizHawk,代码行数:11,代码来源:ProgramFlow.cs


示例16: JMP_Disasm

		void JMP_Disasm(DisassemblyInfo info)
		{
			int pc = info.PC + 2;
			int mode = (op >> 3) & 7;
			int reg = (op >> 0) & 7;
			info.Mnemonic = "jmp";
			info.Args = DisassembleValue(mode, reg, 1, ref pc);
			info.Length = pc - info.PC;
		}
开发者ID:SaxxonPike,项目名称:BizHawk,代码行数:9,代码来源:ProgramFlow.cs


示例17: BSETi_Disasm

		void BSETi_Disasm(DisassemblyInfo info)
		{
			int pc = info.PC + 2;
			int bit = ReadWord(pc); pc += 2;
			int mode = (op >> 3) & 7;
			int reg = op & 7;

			info.Mnemonic = "bset";
			info.Args = String.Format("#${0:X}, {1}", bit, DisassembleValue(mode, reg, 1, ref pc));
			info.Length = pc - info.PC;
		}
开发者ID:SaxxonPike,项目名称:BizHawk,代码行数:11,代码来源:ProgramFlow.cs


示例18: RTE_Disasm

		void RTE_Disasm(DisassemblyInfo info)
		{
			info.Mnemonic = "rte";
			info.Args = "";
		}
开发者ID:SaxxonPike,项目名称:BizHawk,代码行数:5,代码来源:ProgramFlow.cs


示例19: DBcc_Disasm

		void DBcc_Disasm(DisassemblyInfo info)
		{
			int cond = (op >> 8) & 0x0F;
			if (cond == 1)
				info.Mnemonic = "dbra";
			else
				info.Mnemonic = "db" + DisassembleCondition(cond);

			int pc = info.PC + 2;
			info.Args = String.Format("D{0}, ${1:X}", op & 7, pc + ReadWord(pc));
			info.Length = 4;
		}
开发者ID:SaxxonPike,项目名称:BizHawk,代码行数:12,代码来源:ProgramFlow.cs


示例20: CMPA_Disasm

		void CMPA_Disasm(DisassemblyInfo info)
		{
			int pc = info.PC + 2;

			int aReg = (op >> 9) & 7;
			int size = (op >> 8) & 1;
			int mode = (op >> 3) & 7;
			int reg = (op >> 0) & 7;

			switch (size)
			{
				case 0:
					info.Mnemonic = "cmpa.w";
					info.Args = DisassembleValue(mode, reg, 2, ref pc) + ", A" + aReg;
					break;
				case 1:
					info.Mnemonic = "cmpa.l";
					info.Args = DisassembleValue(mode, reg, 4, ref pc) + ", A" + aReg;
					break;
			}
			info.Length = pc - info.PC;
		}
开发者ID:ddugovic,项目名称:RASuite,代码行数:22,代码来源:IntegerMath.cs



注:本文中的BizHawk.Emulation.Cores.Components.M68000.DisassemblyInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# NES.NES类代码示例发布时间:2022-05-24
下一篇:
C# Common.MemoryDomain类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap