📄 cpu0.c
字号:
put_long(dsta,newv);}}}}}}}void op_600(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ BYTE src = nextiword();{ BYTE dst = (Shptr->regs).d[dstreg];{{ULONG newv = ((BYTE)(dst)) + ((BYTE)(src));{ int flgs = ((BYTE)(src)) < 0; int flgo = ((BYTE)(dst)) < 0; int flgn = ((BYTE)(newv)) < 0; ZFLG = ((BYTE)(newv)) == 0; VFLG = (flgs == flgo) && (flgn != flgo); CFLG = (Shptr->regs).x = ((UBYTE)(~dst)) < ((UBYTE)(src)); NFLG = flgn != 0; (Shptr->regs).d[dstreg] &= ~0xff; (Shptr->regs).d[dstreg] |= (newv) & 0xff;}}}}}}}void op_610(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ BYTE src = nextiword();{ CPTR dsta = (Shptr->regs).a[dstreg]; BYTE dst = get_byte(dsta);{{ULONG newv = ((BYTE)(dst)) + ((BYTE)(src));{ int flgs = ((BYTE)(src)) < 0; int flgo = ((BYTE)(dst)) < 0; int flgn = ((BYTE)(newv)) < 0; ZFLG = ((BYTE)(newv)) == 0; VFLG = (flgs == flgo) && (flgn != flgo); CFLG = (Shptr->regs).x = ((UBYTE)(~dst)) < ((UBYTE)(src)); NFLG = flgn != 0; put_byte(dsta,newv);}}}}}}}void op_618(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ BYTE src = nextiword();{ CPTR dsta = (Shptr->regs).a[dstreg]; BYTE dst = get_byte(dsta);{ (Shptr->regs).a[dstreg] += areg_byteinc[dstreg];{{ULONG newv = ((BYTE)(dst)) + ((BYTE)(src));{ int flgs = ((BYTE)(src)) < 0; int flgo = ((BYTE)(dst)) < 0; int flgn = ((BYTE)(newv)) < 0; ZFLG = ((BYTE)(newv)) == 0; VFLG = (flgs == flgo) && (flgn != flgo); CFLG = (Shptr->regs).x = ((UBYTE)(~dst)) < ((UBYTE)(src)); NFLG = flgn != 0; put_byte(dsta,newv);}}}}}}}}void op_620(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ BYTE src = nextiword();{ (Shptr->regs).a[dstreg] -= areg_byteinc[dstreg];{ CPTR dsta = (Shptr->regs).a[dstreg]; BYTE dst = get_byte(dsta);{{ULONG newv = ((BYTE)(dst)) + ((BYTE)(src));{ int flgs = ((BYTE)(src)) < 0; int flgo = ((BYTE)(dst)) < 0; int flgn = ((BYTE)(newv)) < 0; ZFLG = ((BYTE)(newv)) == 0; VFLG = (flgs == flgo) && (flgn != flgo); CFLG = (Shptr->regs).x = ((UBYTE)(~dst)) < ((UBYTE)(src)); NFLG = flgn != 0; put_byte(dsta,newv);}}}}}}}}void op_628(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ BYTE src = nextiword();{ CPTR dsta = (Shptr->regs).a[dstreg] + (LONG)(WORD)nextiword(); BYTE dst = get_byte(dsta);{{ULONG newv = ((BYTE)(dst)) + ((BYTE)(src));{ int flgs = ((BYTE)(src)) < 0; int flgo = ((BYTE)(dst)) < 0; int flgn = ((BYTE)(newv)) < 0; ZFLG = ((BYTE)(newv)) == 0; VFLG = (flgs == flgo) && (flgn != flgo); CFLG = (Shptr->regs).x = ((UBYTE)(~dst)) < ((UBYTE)(src)); NFLG = flgn != 0; put_byte(dsta,newv);}}}}}}}void op_630(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ BYTE src = nextiword();{ CPTR dsta = (Shptr->regs).a[dstreg]; dsta = get_disp_ea (dsta, nextiword());{ BYTE dst = get_byte(dsta);{{ULONG newv = ((BYTE)(dst)) + ((BYTE)(src));{ int flgs = ((BYTE)(src)) < 0; int flgo = ((BYTE)(dst)) < 0; int flgn = ((BYTE)(newv)) < 0; ZFLG = ((BYTE)(newv)) == 0; VFLG = (flgs == flgo) && (flgn != flgo); CFLG = (Shptr->regs).x = ((UBYTE)(~dst)) < ((UBYTE)(src)); NFLG = flgn != 0; put_byte(dsta,newv);}}}}}}}}void op_638(ULONG opcode){{{ BYTE src = nextiword();{ CPTR dsta = (LONG)(WORD)nextiword(); BYTE dst = get_byte(dsta);{{ULONG newv = ((BYTE)(dst)) + ((BYTE)(src));{ int flgs = ((BYTE)(src)) < 0; int flgo = ((BYTE)(dst)) < 0; int flgn = ((BYTE)(newv)) < 0; ZFLG = ((BYTE)(newv)) == 0; VFLG = (flgs == flgo) && (flgn != flgo); CFLG = (Shptr->regs).x = ((UBYTE)(~dst)) < ((UBYTE)(src)); NFLG = flgn != 0; put_byte(dsta,newv);}}}}}}}void op_639(ULONG opcode){{{ BYTE src = nextiword();{ CPTR dsta = nextilong(); BYTE dst = get_byte(dsta);{{ULONG newv = ((BYTE)(dst)) + ((BYTE)(src));{ int flgs = ((BYTE)(src)) < 0; int flgo = ((BYTE)(dst)) < 0; int flgn = ((BYTE)(newv)) < 0; ZFLG = ((BYTE)(newv)) == 0; VFLG = (flgs == flgo) && (flgn != flgo); CFLG = (Shptr->regs).x = ((UBYTE)(~dst)) < ((UBYTE)(src)); NFLG = flgn != 0; put_byte(dsta,newv);}}}}}}}void op_640(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ WORD src = nextiword();{ WORD dst = (Shptr->regs).d[dstreg];{{ULONG newv = ((WORD)(dst)) + ((WORD)(src));{ int flgs = ((WORD)(src)) < 0; int flgo = ((WORD)(dst)) < 0; int flgn = ((WORD)(newv)) < 0; ZFLG = ((WORD)(newv)) == 0; VFLG = (flgs == flgo) && (flgn != flgo); CFLG = (Shptr->regs).x = ((UWORD)(~dst)) < ((UWORD)(src)); NFLG = flgn != 0; (Shptr->regs).d[dstreg] &= ~0xffff; (Shptr->regs).d[dstreg] |= (newv) & 0xffff;}}}}}}}void op_650(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ WORD src = nextiword();{ CPTR dsta = (Shptr->regs).a[dstreg]; WORD dst = get_word(dsta);{{ULONG newv = ((WORD)(dst)) + ((WORD)(src));{ int flgs = ((WORD)(src)) < 0; int flgo = ((WORD)(dst)) < 0; int flgn = ((WORD)(newv)) < 0; ZFLG = ((WORD)(newv)) == 0; VFLG = (flgs == flgo) && (flgn != flgo); CFLG = (Shptr->regs).x = ((UWORD)(~dst)) < ((UWORD)(src)); NFLG = flgn != 0; put_word(dsta,newv);}}}}}}}void op_658(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ WORD src = nextiword();{ CPTR dsta = (Shptr->regs).a[dstreg]; WORD dst = get_word(dsta);{ (Shptr->regs).a[dstreg] += 2;{{ULONG newv = ((WORD)(dst)) + ((WORD)(src));{ int flgs = ((WORD)(src)) < 0; int flgo = ((WORD)(dst)) < 0; int flgn = ((WORD)(newv)) < 0; ZFLG = ((WORD)(newv)) == 0; VFLG = (flgs == flgo) && (flgn != flgo); CFLG = (Shptr->regs).x = ((UWORD)(~dst)) < ((UWORD)(src)); NFLG = flgn != 0; put_word(dsta,newv);}}}}}}}}void op_660(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ WORD src = nextiword();{ (Shptr->regs).a[dstreg] -= 2;{ CPTR dsta = (Shptr->regs).a[dstreg]; WORD dst = get_word(dsta);{{ULONG newv = ((WORD)(dst)) + ((WORD)(src));{ int flgs = ((WORD)(src)) < 0; int flgo = ((WORD)(dst)) < 0; int flgn = ((WORD)(newv)) < 0; ZFLG = ((WORD)(newv)) == 0; VFLG = (flgs == flgo) && (flgn != flgo); CFLG = (Shptr->regs).x = ((UWORD)(~dst)) < ((UWORD)(src)); NFLG = flgn != 0; put_word(dsta,newv);}}}}}}}}void op_668(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ WORD src = nextiword();{ CPTR dsta = (Shptr->regs).a[dstreg] + (LONG)(WORD)nextiword(); WORD dst = get_word(dsta);{{ULONG newv = ((WORD)(dst)) + ((WORD)(src));{ int flgs = ((WORD)(src)) < 0; int flgo = ((WORD)(dst)) < 0; int flgn = ((WORD)(newv)) < 0; ZFLG = ((WORD)(newv)) == 0; VFLG = (flgs == flgo) && (flgn != flgo); CFLG = (Shptr->regs).x = ((UWORD)(~dst)) < ((UWORD)(src)); NFLG = flgn != 0; put_word(dsta,newv);}}}}}}}void op_670(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ WORD src = nextiword();{ CPTR dsta = (Shptr->regs).a[dstreg]; dsta = get_disp_ea (dsta, nextiword());{ WORD dst = get_word(dsta);{{ULONG newv = ((WORD)(dst)) + ((WORD)(src));{ int flgs = ((WORD)(src)) < 0; int flgo = ((WORD)(dst)) < 0; int flgn = ((WORD)(newv)) < 0; ZFLG = ((WORD)(newv)) == 0; VFLG = (flgs == flgo) && (flgn != flgo); CFLG = (Shptr->regs).x = ((UWORD)(~dst)) < ((UWORD)(src)); NFLG = flgn != 0; put_word(dsta,newv);}}}}}}}}void op_678(ULONG opcode){{{ WORD src = nextiword();{ CPTR dsta = (LONG)(WORD)nextiword(); WORD dst = get_word(dsta);{{ULONG newv = ((WORD)(dst)) + ((WORD)(src));{ int flgs = ((WORD)(src)) < 0; int flgo = ((WORD)(dst)) < 0; int flgn = ((WORD)(newv)) < 0; ZFLG = ((WORD)(newv)) == 0; VFLG = (flgs == flgo) && (flgn != flgo); CFLG = (Shptr->regs).x = ((UWORD)(~dst)) < ((UWORD)(src)); NFLG = flgn != 0; put_word(dsta,newv);}}}}}}}void op_679(ULONG opcode){{{ WORD src = nextiword();{ CPTR dsta = nextilong(); WORD dst = get_word(dsta);{{ULONG newv = ((WORD)(dst)) + ((WORD)(src));{ int flgs = ((WORD)(src)) < 0; int flgo = ((WORD)(dst)) < 0; int flgn = ((WORD)(newv)) < 0; ZFLG = ((WORD)(newv)) == 0; VFLG = (flgs == flgo) && (flgn != flgo); CFLG = (Shptr->regs).x = ((UWORD)(~dst)) < ((UWORD)(src)); NFLG = flgn != 0; put_word(dsta,newv);}}}}}}}void op_680(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ LONG src = nextilong();{ LONG dst = (Shptr->regs).d[dstreg];{{ULONG newv = ((LONG)(dst)) + ((LONG)(src));{ int flgs = ((LONG)(src)) < 0; int flgo = ((LONG)(dst)) < 0; int flgn = ((LONG)(newv)) < 0; ZFLG = ((LONG)(newv)) == 0; VFLG = (flgs == flgo) && (flgn != flgo); CFLG = (Shptr->regs).x = ((ULONG)(~dst)) < ((ULONG)(src)); NFLG = flgn != 0; (Shptr->regs).d[dstreg] = (newv);}}}}}}}void op_690(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ LONG src = nextilong();{ CPTR dsta = (Shptr->regs).a[dstreg]; LONG dst = get_long(dsta);{{ULONG newv = ((LONG)(dst)) + ((LONG)(src));{ int flgs = ((LONG)(src)) < 0; int flgo = ((LONG)(dst)) < 0; int flgn = ((LONG)(newv)) < 0; ZFLG = ((LONG)(newv)) == 0; VFLG = (flgs == flgo) && (flgn != flgo); CFLG = (Shptr->regs).x = ((ULONG)(~dst)) < ((ULONG)(src)); NFLG = flgn != 0; put_long(dsta,newv);}}}}}}}void op_698(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ LONG src = nextilong();{ CPTR dsta = (Shptr->regs).a[dstreg]; LONG dst = get_long(dsta);{ (Shptr->regs).a[dstreg] += 4;{{ULONG newv = ((LONG)(dst)) + ((LONG)(src));{ int flgs = ((LONG)(src)) < 0; int flgo = ((LONG)(dst)) < 0; int flgn = ((LONG)(newv)) < 0; ZFLG = ((LONG)(newv)) == 0; VFLG = (flgs == flgo) && (flgn != flgo); CFLG = (Shptr->regs).x = ((ULONG)(~dst)) < ((ULONG)(src)); NFLG = flgn != 0; put_long(dsta,newv);}}}}}}}}void op_6a0(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ LONG src = nextilong();{ (Shptr->regs).a[dstreg] -= 4;{ CPTR dsta = (Shptr->regs).a[dstreg]; LONG dst = get_long(dsta);{{ULONG newv = ((LONG)(dst)) + ((LONG)(src));{ int flgs = ((LONG)(src)) < 0; int flgo = ((LONG)(dst)) < 0; int flgn = ((LONG)(newv)) < 0; ZFLG = ((LONG)(newv)) == 0; VFLG = (flgs == flgo) && (flgn != flgo); CFLG = (Shptr->regs).x = ((ULONG)(~dst)) < ((ULONG)(src)); NFLG = flgn != 0; put_long(dsta,newv);}}}}}}}}void op_6a8(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ LONG src = nextilong();{ CPTR dsta = (Shptr->regs).a[dstreg] + (LONG)(WORD)nextiword(); LONG dst = get_long(dsta);{{ULONG newv = ((LONG)(dst)) + ((LONG)(src));{ int flgs = ((LONG)(src)) < 0; int flgo = ((LONG)(dst)) < 0; int flgn = ((LONG)(newv)) < 0; ZFLG = ((LONG)(newv)) == 0; VFLG = (flgs == flgo) && (flgn != flgo); CFLG = (Shptr->regs).x = ((ULONG)(~dst)) < ((ULONG)(src)); NFLG = flgn != 0; put_long(dsta,newv);}}}}}}}void op_6b0(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ LONG src = nextilong();{ CPTR dsta = (Shptr->regs).a[dstreg]; dsta = get_disp_ea (dsta, nextiword());{ LONG dst = get_long(dsta);{{ULONG newv = ((LONG)(dst)) + ((LONG)(src));{ int flgs = ((LONG)(src)) < 0; int flgo = ((LONG)(dst)) < 0; int flgn = ((LONG)(newv)) < 0; ZFLG = ((LONG)(newv)) == 0; VFLG = (flgs == flgo) && (flgn != flgo); CFLG = (Shptr->regs).x = ((ULONG)(~dst)) < ((ULONG)(src)); NFLG = flgn != 0; put_long(dsta,newv);}}}}}}}}void op_6b8(ULONG opcode){{{ LONG src = nextilong();{ CPTR dsta = (LONG)(WORD)nextiword(); LONG dst = get_long(dsta);{{ULONG newv = ((LONG)(dst)) + ((LONG)(src));{ int flgs = ((LONG)(src)) < 0; int flgo = ((LONG)(dst)) < 0; int flgn = ((LONG)(newv)) < 0; ZFLG = ((LONG)(newv)) == 0; VFLG = (flgs == flgo) && (flgn != flgo); CFLG = (Shptr->regs).x = ((ULONG)(~dst)) < ((ULONG)(src)); NFLG = flgn != 0; put_long(dsta,newv);}}}}}}}void op_6b9(ULONG opcode){{{ LONG src = nextilong();{ CPTR dsta = nextilong(); LONG dst = get_long(dsta);{{ULONG newv = ((LONG)(dst)) + ((LONG)(src));{ int flgs = ((LONG)(src)) < 0; int flgo = ((LONG)(dst)) < 0; int flgn = ((LONG)(newv)) < 0; ZFLG = ((LONG)(newv)) == 0; VFLG = (flgs == flgo) && (flgn != flgo); CFLG = (Shptr->regs).x = ((ULONG)(~dst)) < ((ULONG)(src)); NFLG = flgn != 0; put_long(dsta,newv);}}}}}}}void op_800(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ WORD src = nextiword();{ LONG dst = (Shptr->regs).d[dstreg]; src &= 31; ZFLG = !(dst & (1 << src));}}}}void op_810(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ WORD src = nextiword();{ CPTR dsta = (Shptr->regs).a[dstreg]; BYTE dst = get_byte(dsta); src &= 7; ZFLG = !(dst & (1 << src));}}}}void op_818(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ WORD src = nextiword();{ CPTR dsta = (Shptr->regs).a[dstreg]; BYTE dst = get_byte(dsta);{ (Shptr->regs).a[dstreg] += areg_byteinc[dstreg]; src &= 7; ZFLG = !(dst & (1 << src));}}}}}void op_820(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ WORD src = nextiword();{ (Shptr->regs).a[dstreg] -= areg_byteinc[dstreg];{ CPTR dsta = (Shptr->regs).a[dstreg]; BYTE dst = get_byte(dsta); src &= 7; ZFLG = !(dst & (1 << src));}}}}}void op_828(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ WORD src = nextiword();{ CPTR dsta = (Shptr->regs).a[dstreg] + (LONG)(WORD)nextiword(); BYTE dst = get_byte(dsta); src &= 7; ZFLG = !(dst & (1 << src));}}}}void op_830(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ WORD src = nextiword();{ CPTR dsta = (Shptr->regs).a[dstreg]; dsta = get_disp_ea (dsta, nextiword());{ BYTE dst = get_byte(dsta); src &= 7; ZFLG = !(dst & (1 << src));}}}}}void op_838(ULONG opcode){{{ WORD src = nextiword();{ CPTR dsta = (LONG)(WORD)nextiword(); BYTE dst = get_byte(dsta); src &= 7; ZFLG = !(dst & (1 << src));}}}}void op_839(ULONG opcode){{{ WORD src = nextiword();{ CPTR dsta = nextilong(); BYTE dst = get_byte(dsta); src &= 7; ZFLG = !(dst & (1 << src));}}}}void op_83a(ULONG opcode){/* ULONG dstreg = (LONG)(BYTE)2; */{{ WORD src = nextiword();{ CPTR dsta = MC68000_getpc(); dsta += (LONG)(WORD)nextiword();{ BYTE dst = get_byte(dsta); src &= 7; ZFLG = !(dst & (1 << src));}}}}}void op_83b(ULONG opcode){/* ULONG dstreg = (LONG)(BYTE)3; */{{ WORD src = nextiword();{ CPTR dsta = MC68000_getpc(); dsta = get_disp_ea (dsta, nextiword());{ BYTE dst = get_byte(dsta); src &= 7; ZFLG = !(dst & (1 << src));}}}}}void op_83c(ULONG opcode){{{ WORD src = nextiword();{ BYTE dst = nextiword(); src &= 7; ZFLG = !(dst & (1 << src));}}}}void op_840(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ WORD src = nextiword();{ LONG dst = (Shptr->regs).d[dstreg]; src &= 31; ZFLG = !(dst & (1 << src)); dst ^= (1 << src); (Shptr->regs).d[dstreg] = (dst);}}}}void op_850(ULONG opcode){ ULONG dstreg = (opcode & 7) >> 0;{{ WORD src = nextiword();{ CPTR dsta = (Shptr->regs).a[dstreg]; BYTE dst = get_byte(dsta); src &= 7;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -