📄 opcoded.c
字号:
#include "cpudefs.h"
void op_d000(void) /* ADD */
{
ULONG srcreg = (opcode & 7);
ULONG dstreg = (opcode >> 9) & 7;
{{ BYTE src = regs.d[srcreg].B.l;
{ BYTE dst = regs.d[dstreg].B.l;
{{ULONG newv = ((BYTE)(dst)) + ((BYTE)(src));
ZFLG = ((BYTE)(newv)) == 0;
regs.d[dstreg].B.l = newv;
{ int flgs = ((BYTE)(src)) < 0;
int flgo = ((BYTE)(dst)) < 0;
int flgn = ((BYTE)(newv)) < 0;
VFLG = (flgs == flgo) && (flgn != flgo);
CFLG = regs.x = ((UBYTE)(~dst)) < ((UBYTE)(src));
NFLG = flgn != 0;
}}}}}}}
void op_d010(void) /* ADD */
{
ULONG srcreg = (opcode & 7);
ULONG dstreg = (opcode >> 9) & 7;
{{ CPTR srca = regs.a[srcreg];
BYTE src = get_byte(srca);
{ BYTE dst = regs.d[dstreg].B.l;
{{ULONG newv = ((BYTE)(dst)) + ((BYTE)(src));
regs.d[dstreg].B.l = newv;
ZFLG = ((BYTE)(newv)) == 0;
{ int flgs = ((BYTE)(src)) < 0;
int flgo = ((BYTE)(dst)) < 0;
int flgn = ((BYTE)(newv)) < 0;
VFLG = (flgs == flgo) && (flgn != flgo);
CFLG = regs.x = ((UBYTE)(~dst)) < ((UBYTE)(src));
NFLG = flgn != 0;
}}}}}}}
void op_d018(void) /* ADD */
{
ULONG srcreg = (opcode & 7);
ULONG dstreg = (opcode >> 9) & 7;
{{ CPTR srca = regs.a[srcreg];
BYTE src = get_byte(srca);
{ regs.a[srcreg] += areg_byteinc[srcreg];
{ BYTE dst = regs.d[dstreg].B.l;
{{ULONG newv = ((BYTE)(dst)) + ((BYTE)(src));
ZFLG = ((BYTE)(newv)) == 0;
{ int flgs = ((BYTE)(src)) < 0;
int flgo = ((BYTE)(dst)) < 0;
int flgn = ((BYTE)(newv)) < 0;
VFLG = (flgs == flgo) && (flgn != flgo);
CFLG = regs.x = ((UBYTE)(~dst)) < ((UBYTE)(src));
NFLG = flgn != 0;
regs.d[dstreg].B.l = newv;
}}}}}}}}
void op_d020(void) /* ADD */
{
ULONG srcreg = (opcode & 7);
ULONG dstreg = (opcode >> 9) & 7;
{{ regs.a[srcreg] -= areg_byteinc[srcreg];
{ CPTR srca = regs.a[srcreg];
BYTE src = get_byte(srca);
{ BYTE dst = regs.d[dstreg].B.l;
{{ULONG newv = ((BYTE)(dst)) + ((BYTE)(src));
ZFLG = ((BYTE)(newv)) == 0;
{ int flgs = ((BYTE)(src)) < 0;
int flgo = ((BYTE)(dst)) < 0;
int flgn = ((BYTE)(newv)) < 0;
VFLG = (flgs == flgo) && (flgn != flgo);
CFLG = regs.x = ((UBYTE)(~dst)) < ((UBYTE)(src));
NFLG = flgn != 0;
regs.d[dstreg].B.l = newv;
}}}}}}}}
void op_d028(void) /* ADD */
{
ULONG srcreg = (opcode & 7);
ULONG dstreg = (opcode >> 9) & 7;
{{ CPTR srca = regs.a[srcreg] + (LONG)(WORD)nextiword();
BYTE src = get_byte(srca);
{ BYTE dst = regs.d[dstreg].B.l;
{{ULONG newv = ((BYTE)(dst)) + ((BYTE)(src));
regs.d[dstreg].B.l = newv;
ZFLG = ((BYTE)(newv)) == 0;
{ int flgs = ((BYTE)(src)) < 0;
int flgo = ((BYTE)(dst)) < 0;
int flgn = ((BYTE)(newv)) < 0;
VFLG = (flgs == flgo) && (flgn != flgo);
CFLG = regs.x = ((UBYTE)(~dst)) < ((UBYTE)(src));
NFLG = flgn != 0;
}}}}}}}
void op_d030(void) /* ADD */
{
ULONG srcreg = (opcode & 7);
ULONG dstreg = (opcode >> 9) & 7;
{{ CPTR srca = get_disp_ea(regs.a[srcreg]);
{ BYTE src = get_byte(srca);
{ BYTE dst = regs.d[dstreg].B.l;
{{ULONG newv = ((BYTE)(dst)) + ((BYTE)(src));
regs.d[dstreg].B.l = newv;
ZFLG = ((BYTE)(newv)) == 0;
{ int flgs = ((BYTE)(src)) < 0;
int flgo = ((BYTE)(dst)) < 0;
int flgn = ((BYTE)(newv)) < 0;
VFLG = (flgs == flgo) && (flgn != flgo);
CFLG = regs.x = ((UBYTE)(~dst)) < ((UBYTE)(src));
NFLG = flgn != 0;
}}}}}}}}
void op_d038(void) /* ADD */
{
ULONG dstreg = (opcode >> 9) & 7;
{{ CPTR srca = (LONG)(WORD)nextiword();
BYTE src = get_byte(srca);
{ BYTE dst = regs.d[dstreg].B.l;
{{ULONG newv = ((BYTE)(dst)) + ((BYTE)(src));
regs.d[dstreg].B.l = newv;
ZFLG = ((BYTE)(newv)) == 0;
{ int flgs = ((BYTE)(src)) < 0;
int flgo = ((BYTE)(dst)) < 0;
int flgn = ((BYTE)(newv)) < 0;
VFLG = (flgs == flgo) && (flgn != flgo);
CFLG = regs.x = ((UBYTE)(~dst)) < ((UBYTE)(src));
NFLG = flgn != 0;
}}}}}}}
void op_d039(void) /* ADD */
{
ULONG dstreg = (opcode >> 9) & 7;
{{ CPTR srca = nextilong();
BYTE src = get_byte(srca);
{ BYTE dst = regs.d[dstreg].B.l;
{{ULONG newv = ((BYTE)(dst)) + ((BYTE)(src));
regs.d[dstreg].B.l = newv;
ZFLG = ((BYTE)(newv)) == 0;
{ int flgs = ((BYTE)(src)) < 0;
int flgo = ((BYTE)(dst)) < 0;
int flgn = ((BYTE)(newv)) < 0;
VFLG = (flgs == flgo) && (flgn != flgo);
CFLG = regs.x = ((UBYTE)(~dst)) < ((UBYTE)(src));
NFLG = flgn != 0;
}}}}}}}
void op_d03a(void) /* ADD */
{
ULONG dstreg = (opcode >> 9) & 7;
{{ CPTR srca = m68k_getpc();
srca += (LONG)(WORD)nextiword();
{ BYTE src = get_byte(srca);
{ BYTE dst = regs.d[dstreg].B.l;
{{ULONG newv = ((BYTE)(dst)) + ((BYTE)(src));
regs.d[dstreg].B.l = newv;
ZFLG = ((BYTE)(newv)) == 0;
{ int flgs = ((BYTE)(src)) < 0;
int flgo = ((BYTE)(dst)) < 0;
int flgn = ((BYTE)(newv)) < 0;
VFLG = (flgs == flgo) && (flgn != flgo);
CFLG = regs.x = ((UBYTE)(~dst)) < ((UBYTE)(src));
NFLG = flgn != 0;
}}}}}}}}
void op_d03b(void) /* ADD */
{
ULONG dstreg = (opcode >> 9) & 7;
{{ CPTR srca = get_disp_ea(m68k_getpc());
{ BYTE src = get_byte(srca);
{ BYTE dst = regs.d[dstreg].B.l;
{{ULONG newv = ((BYTE)(dst)) + ((BYTE)(src));
regs.d[dstreg].B.l = newv;
ZFLG = ((BYTE)(newv)) == 0;
{ int flgs = ((BYTE)(src)) < 0;
int flgo = ((BYTE)(dst)) < 0;
int flgn = ((BYTE)(newv)) < 0;
VFLG = (flgs == flgo) && (flgn != flgo);
CFLG = regs.x = ((UBYTE)(~dst)) < ((UBYTE)(src));
NFLG = flgn != 0;
}}}}}}}}
void op_d03c(void) /* ADD */
{
ULONG dstreg = (opcode >> 9) & 7;
{{ BYTE src = nextiword();
{ BYTE dst = regs.d[dstreg].B.l;
{{ULONG newv = ((BYTE)(dst)) + ((BYTE)(src));
regs.d[dstreg].B.l = newv;
ZFLG = ((BYTE)(newv)) == 0;
{ int flgs = ((BYTE)(src)) < 0;
int flgo = ((BYTE)(dst)) < 0;
int flgn = ((BYTE)(newv)) < 0;
VFLG = (flgs == flgo) && (flgn != flgo);
CFLG = regs.x = ((UBYTE)(~dst)) < ((UBYTE)(src));
NFLG = flgn != 0;
}}}}}}}
void op_d040(void) /* ADD */
{
ULONG srcreg = (opcode & 7);
ULONG dstreg = (opcode >> 9) & 7;
{{ WORD src = regs.d[srcreg].W.l;
{ WORD dst = regs.d[dstreg].W.l;
{{ULONG newv = ((WORD)(dst)) + ((WORD)(src));
regs.d[dstreg].W.l = newv;
ZFLG = ((WORD)(newv)) == 0;
{ int flgs = ((WORD)(src)) < 0;
int flgo = ((WORD)(dst)) < 0;
int flgn = ((WORD)(newv)) < 0;
VFLG = (flgs == flgo) && (flgn != flgo);
CFLG = regs.x = ((UWORD)(~dst)) < ((UWORD)(src));
NFLG = flgn != 0;
}}}}}}}
void op_d048(void) /* ADD */
{
ULONG srcreg = (opcode & 7);
ULONG dstreg = (opcode >> 9) & 7;
{{ WORD src = regs.a[srcreg];
{ WORD dst = regs.d[dstreg].W.l;
{{ULONG newv = ((WORD)(dst)) + ((WORD)(src));
regs.d[dstreg].W.l = newv;
ZFLG = ((WORD)(newv)) == 0;
{ int flgs = ((WORD)(src)) < 0;
int flgo = ((WORD)(dst)) < 0;
int flgn = ((WORD)(newv)) < 0;
VFLG = (flgs == flgo) && (flgn != flgo);
CFLG = regs.x = ((UWORD)(~dst)) < ((UWORD)(src));
NFLG = flgn != 0;
}}}}}}}
void op_d050(void) /* ADD */
{
ULONG srcreg = (opcode & 7);
ULONG dstreg = (opcode >> 9) & 7;
{{ CPTR srca = regs.a[srcreg];
WORD src = get_word(srca);
{ WORD dst = regs.d[dstreg].W.l;
{{ULONG newv = ((WORD)(dst)) + ((WORD)(src));
regs.d[dstreg].W.l = newv;
ZFLG = ((WORD)(newv)) == 0;
{ int flgs = ((WORD)(src)) < 0;
int flgo = ((WORD)(dst)) < 0;
int flgn = ((WORD)(newv)) < 0;
VFLG = (flgs == flgo) && (flgn != flgo);
CFLG = regs.x = ((UWORD)(~dst)) < ((UWORD)(src));
NFLG = flgn != 0;
}}}}}}}
void op_d058(void) /* ADD */
{
ULONG srcreg = (opcode & 7);
ULONG dstreg = (opcode >> 9) & 7;
{{ CPTR srca = regs.a[srcreg];
WORD src = get_word(srca);
{ regs.a[srcreg] += 2;
{ WORD dst = regs.d[dstreg].W.l;
{{ULONG newv = ((WORD)(dst)) + ((WORD)(src));
regs.d[dstreg].W.l = newv;
ZFLG = ((WORD)(newv)) == 0;
{ int flgs = ((WORD)(src)) < 0;
int flgo = ((WORD)(dst)) < 0;
int flgn = ((WORD)(newv)) < 0;
VFLG = (flgs == flgo) && (flgn != flgo);
CFLG = regs.x = ((UWORD)(~dst)) < ((UWORD)(src));
NFLG = flgn != 0;
}}}}}}}}
void op_d060(void) /* ADD */
{
ULONG srcreg = (opcode & 7);
ULONG dstreg = (opcode >> 9) & 7;
{{ regs.a[srcreg] -= 2;
{ CPTR srca = regs.a[srcreg];
WORD src = get_word(srca);
{ WORD dst = regs.d[dstreg].W.l;
{{ULONG newv = ((WORD)(dst)) + ((WORD)(src));
regs.d[dstreg].W.l = newv;
ZFLG = ((WORD)(newv)) == 0;
{ int flgs = ((WORD)(src)) < 0;
int flgo = ((WORD)(dst)) < 0;
int flgn = ((WORD)(newv)) < 0;
VFLG = (flgs == flgo) && (flgn != flgo);
CFLG = regs.x = ((UWORD)(~dst)) < ((UWORD)(src));
NFLG = flgn != 0;
}}}}}}}}
void op_d068(void) /* ADD */
{
ULONG srcreg = (opcode & 7);
ULONG dstreg = (opcode >> 9) & 7;
{{ CPTR srca = regs.a[srcreg] + (LONG)(WORD)nextiword();
WORD src = get_word(srca);
{ WORD dst = regs.d[dstreg].W.l;
{{ULONG newv = ((WORD)(dst)) + ((WORD)(src));
regs.d[dstreg].W.l = newv;
ZFLG = ((WORD)(newv)) == 0;
{ int flgs = ((WORD)(src)) < 0;
int flgo = ((WORD)(dst)) < 0;
int flgn = ((WORD)(newv)) < 0;
VFLG = (flgs == flgo) && (flgn != flgo);
CFLG = regs.x = ((UWORD)(~dst)) < ((UWORD)(src));
NFLG = flgn != 0;
}}}}}}}
void op_d070(void) /* ADD */
{
ULONG srcreg = (opcode & 7);
ULONG dstreg = (opcode >> 9) & 7;
{{ CPTR srca = get_disp_ea(regs.a[srcreg]);
{ WORD src = get_word(srca);
{ WORD dst = regs.d[dstreg].W.l;
{{ULONG newv = ((WORD)(dst)) + ((WORD)(src));
regs.d[dstreg].W.l = newv;
ZFLG = ((WORD)(newv)) == 0;
{ int flgs = ((WORD)(src)) < 0;
int flgo = ((WORD)(dst)) < 0;
int flgn = ((WORD)(newv)) < 0;
VFLG = (flgs == flgo) && (flgn != flgo);
CFLG = regs.x = ((UWORD)(~dst)) < ((UWORD)(src));
NFLG = flgn != 0;
}}}}}}}}
void op_d078(void) /* ADD */
{
ULONG dstreg = (opcode >> 9) & 7;
{{ CPTR srca = (LONG)(WORD)nextiword();
WORD src = get_word(srca);
{ WORD dst = regs.d[dstreg].W.l;
{{ULONG newv = ((WORD)(dst)) + ((WORD)(src));
regs.d[dstreg].W.l = newv;
ZFLG = ((WORD)(newv)) == 0;
{ int flgs = ((WORD)(src)) < 0;
int flgo = ((WORD)(dst)) < 0;
int flgn = ((WORD)(newv)) < 0;
VFLG = (flgs == flgo) && (flgn != flgo);
CFLG = regs.x = ((UWORD)(~dst)) < ((UWORD)(src));
NFLG = flgn != 0;
}}}}}}}
void op_d079(void) /* ADD */
{
ULONG dstreg = (opcode >> 9) & 7;
{{ CPTR srca = nextilong();
WORD src = get_word(srca);
{ WORD dst = regs.d[dstreg].W.l;
{{ULONG newv = ((WORD)(dst)) + ((WORD)(src));
regs.d[dstreg].W.l = newv;
ZFLG = ((WORD)(newv)) == 0;
{ int flgs = ((WORD)(src)) < 0;
int flgo = ((WORD)(dst)) < 0;
int flgn = ((WORD)(newv)) < 0;
VFLG = (flgs == flgo) && (flgn != flgo);
CFLG = regs.x = ((UWORD)(~dst)) < ((UWORD)(src));
NFLG = flgn != 0;
}}}}}}}
void op_d07a(void) /* ADD */
{
ULONG dstreg = (opcode >> 9) & 7;
{{ CPTR srca = m68k_getpc();
srca += (LONG)(WORD)nextiword();
{ WORD src = get_word(srca);
{ WORD dst = regs.d[dstreg].W.l;
{{ULONG newv = ((WORD)(dst)) + ((WORD)(src));
regs.d[dstreg].W.l = newv;
ZFLG = ((WORD)(newv)) == 0;
{ int flgs = ((WORD)(src)) < 0;
int flgo = ((WORD)(dst)) < 0;
int flgn = ((WORD)(newv)) < 0;
VFLG = (flgs == flgo) && (flgn != flgo);
CFLG = regs.x = ((UWORD)(~dst)) < ((UWORD)(src));
NFLG = flgn != 0;
}}}}}}}}
void op_d07b(void) /* ADD */
{
ULONG dstreg = (opcode >> 9) & 7;
{{ CPTR srca = get_disp_ea(m68k_getpc());
{ WORD src = get_word(srca);
{ WORD dst = regs.d[dstreg].W.l;
{{ULONG newv = ((WORD)(dst)) + ((WORD)(src));
regs.d[dstreg].W.l = newv;
ZFLG = ((WORD)(newv)) == 0;
{ int flgs = ((WORD)(src)) < 0;
int flgo = ((WORD)(dst)) < 0;
int flgn = ((WORD)(newv)) < 0;
VFLG = (flgs == flgo) && (flgn != flgo);
CFLG = regs.x = ((UWORD)(~dst)) < ((UWORD)(src));
NFLG = flgn != 0;
}}}}}}}}
void op_d07c(void) /* ADD */
{
ULONG dstreg = (opcode >> 9) & 7;
{{ WORD src = nextiword();
{ WORD dst = regs.d[dstreg].W.l;
{{ULONG newv = ((WORD)(dst)) + ((WORD)(src));
regs.d[dstreg].W.l = newv;
ZFLG = ((WORD)(newv)) == 0;
{ int flgs = ((WORD)(src)) < 0;
int flgo = ((WORD)(dst)) < 0;
int flgn = ((WORD)(newv)) < 0;
VFLG = (flgs == flgo) && (flgn != flgo);
CFLG = regs.x = ((UWORD)(~dst)) < ((UWORD)(src));
NFLG = flgn != 0;
}}}}}}}
void op_d080(void) /* ADD */
{
ULONG srcreg = (opcode & 7);
ULONG dstreg = (opcode >> 9) & 7;
{{ LONG src = regs.d[srcreg].D;
{ LONG dst = regs.d[dstreg].D;
{{ULONG newv = ((LONG)(dst)) + ((LONG)(src));
regs.d[dstreg].D = (newv);
ZFLG = ((LONG)(newv)) == 0;
{ int flgs = ((LONG)(src)) < 0;
int flgo = ((LONG)(dst)) < 0;
int flgn = ((LONG)(newv)) < 0;
VFLG = (flgs == flgo) && (flgn != flgo);
CFLG = regs.x = ((ULONG)(~dst)) < ((ULONG)(src));
NFLG = flgn != 0;
}}}}}}}
void op_d088(void) /* ADD */
{
ULONG srcreg = (opcode & 7);
ULONG dstreg = (opcode >> 9) & 7;
{{ LONG src = regs.a[srcreg];
{ LONG dst = regs.d[dstreg].D;
{{ULONG newv = ((LONG)(dst)) + ((LONG)(src));
regs.d[dstreg].D = (newv);
ZFLG = ((LONG)(newv)) == 0;
{ int flgs = ((LONG)(src)) < 0;
int flgo = ((LONG)(dst)) < 0;
int flgn = ((LONG)(newv)) < 0;
VFLG = (flgs == flgo) && (flgn != flgo);
CFLG = regs.x = ((ULONG)(~dst)) < ((ULONG)(src));
NFLG = flgn != 0;
}}}}}}}
void op_d090(void) /* ADD */
{
ULONG srcreg = (opcode & 7);
ULONG dstreg = (opcode >> 9) & 7;
{{ CPTR srca = regs.a[srcreg];
LONG src = get_long(srca);
{ LONG dst = regs.d[dstreg].D;
{{ULONG newv = ((LONG)(dst)) + ((LONG)(src));
regs.d[dstreg].D = (newv);
ZFLG = ((LONG)(newv)) == 0;
{ int flgs = ((LONG)(src)) < 0;
int flgo = ((LONG)(dst)) < 0;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -