MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / outopcode

Function outopcode

src/gencpu.cpp:9664–9702  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9662};
9663
9664static char *outopcode (int opcode)
9665{
9666 static char out[100];
9667 struct instr *ins;
9668 int i;
9669
9670 ins = &table68k[opcode];
9671 for (i = 0; lookuptab[i].name[0]; i++) {
9672 if (ins->mnemo == lookuptab[i].mnemo)
9673 break;
9674 }
9675 {
9676 char *s = ua (lookuptab[i].name);
9677 strcpy (out, s);
9678 xfree (s);
9679 }
9680 if (ins->smode == immi)
9681 strcat (out, "Q");
9682 if (ins->size == sz_byte)
9683 strcat (out,".B");
9684 if (ins->size == sz_word)
9685 strcat (out,".W");
9686 if (ins->size == sz_long)
9687 strcat (out,".L");
9688 strcat (out," ");
9689 if (ins->suse)
9690 strcat (out, decodeEA (ins->smode, ins->size));
9691 if (ins->duse) {
9692 if (ins->suse) strcat (out,",");
9693 strcat (out, decodeEA (ins->dmode, ins->size));
9694 }
9695 if (ins->mnemo == i_DBcc || ins->mnemo == i_Scc || ins->mnemo == i_Bcc || ins->mnemo == i_TRAPcc) {
9696 strcat (out, " (");
9697 strcat (out, m68k_cc[table68k[opcode].cc]);
9698 strcat (out, ")");
9699 }
9700
9701 return out;
9702}
9703
9704struct cputbl_tmp
9705{

Callers 1

generate_one_opcodeFunction · 0.70

Calls 2

uaFunction · 0.85
decodeEAFunction · 0.70

Tested by

no test coverage detected