📄 opcode9.c
字号:
#include "cpudefs.h"
void op_9000(void) /* SUB */
{
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));
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)(src)) > ((UBYTE)(dst));
NFLG = flgn != 0;
}}}}}}}
void op_9010(void) /* SUB */
{
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)(src)) > ((UBYTE)(dst));
NFLG = flgn != 0;
}}}}}}}
void op_9018(void) /* SUB */
{
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));
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)(src)) > ((UBYTE)(dst));
NFLG = flgn != 0;
}}}}}}}}
void op_9020(void) /* SUB */
{
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));
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)(src)) > ((UBYTE)(dst));
NFLG = flgn != 0;
}}}}}}}}
void op_9028(void) /* SUB */
{
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)(src)) > ((UBYTE)(dst));
NFLG = flgn != 0;
}}}}}}}
void op_9030(void) /* SUB */
{
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)(src)) > ((UBYTE)(dst));
NFLG = flgn != 0;
}}}}}}}}
void op_9038(void) /* SUB */
{
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)(src)) > ((UBYTE)(dst));
NFLG = flgn != 0;
}}}}}}}
void op_9039(void) /* SUB */
{
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)(src)) > ((UBYTE)(dst));
NFLG = flgn != 0;
}}}}}}}
void op_903a(void) /* SUB */
{
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)(src)) > ((UBYTE)(dst));
NFLG = flgn != 0;
}}}}}}}}
void op_903b(void) /* SUB */
{
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)(src)) > ((UBYTE)(dst));
NFLG = flgn != 0;
}}}}}}}}
void op_903c(void) /* SUB */
{
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)(src)) > ((UBYTE)(dst));
NFLG = flgn != 0;
}}}}}}}
void op_9040(void) /* SUB */
{
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)(src)) > ((UWORD)(dst));
NFLG = flgn != 0;
}}}}}}}
void op_9048(void) /* SUB */
{
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)(src)) > ((UWORD)(dst));
NFLG = flgn != 0;
}}}}}}}
void op_9050(void) /* SUB */
{
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)(src)) > ((UWORD)(dst));
NFLG = flgn != 0;
}}}}}}}
void op_9058(void) /* SUB */
{
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)(src)) > ((UWORD)(dst));
NFLG = flgn != 0;
}}}}}}}}
void op_9060(void) /* SUB */
{
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)(src)) > ((UWORD)(dst));
NFLG = flgn != 0;
}}}}}}}}
void op_9068(void) /* SUB */
{
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)(src)) > ((UWORD)(dst));
NFLG = flgn != 0;
}}}}}}}
void op_9070(void) /* SUB */
{
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)(src)) > ((UWORD)(dst));
NFLG = flgn != 0;
}}}}}}}}
void op_9078(void) /* SUB */
{
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)(src)) > ((UWORD)(dst));
NFLG = flgn != 0;
}}}}}}}
void op_9079(void) /* SUB */
{
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)(src)) > ((UWORD)(dst));
NFLG = flgn != 0;
}}}}}}}
void op_907a(void) /* SUB */
{
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)(src)) > ((UWORD)(dst));
NFLG = flgn != 0;
}}}}}}}}
void op_907b(void) /* SUB */
{
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)(src)) > ((UWORD)(dst));
NFLG = flgn != 0;
}}}}}}}}
void op_907c(void) /* SUB */
{
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)(src)) > ((UWORD)(dst));
NFLG = flgn != 0;
}}}}}}}
void op_9080(void) /* SUB */
{
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)(src)) > ((ULONG)(dst));
NFLG = flgn != 0;
}}}}}}}
void op_9088(void) /* SUB */
{
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)(src)) > ((ULONG)(dst));
NFLG = flgn != 0;
}}}}}}}
void op_9090(void) /* SUB */
{
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 + -