new version
[Chiptunes-pms150c.git] / fakeasm.h
CommitLineData
42c6050e
TG
1int flag_z = 0;
2int flag_c = 0;
3//ignoring flag_ov, flag_ac
5ebb16dc 4#define MOV(dst, src) dst = src;
c004ed39
TG
5#define SL(dst) flag_c = (dst>>7); dst <<= 1;
6#define SR(dst) flag_c = (dst&01); dst >>= 1;
42c6050e
TG
7#define SWAP(dst) dst = (dst<<4 | dst>>4);
8#define AND(dst, src) dst &= src; flag_z = (dst==0);
9#define OR(dst, src) dst |= src; flag_z = (dst==0);
5ebb16dc 10#define CLEAR(dst) dst = 0;
42c6050e
TG
11#define ADD(dst, src) dst += src; flag_c = (src+dst>0xff); flag_z = (dst==0);
12#define INC(dst) dst += 1; flag_c = flag_z = (dst==0);
13#define ADDC0(dst) dst += flag_c; flag_c = flag_z = (dst==0);
b2ed0598
TG
14#define CALL(addr) addr();
15#define XOR(dst, src) dst ^= src; flag_z = (dst==0);
16#define SUB(dst, src) flag_c = (src > dst); dst -= src; flag_z = (dst==0);
d17a26fd 17#define XCH(dst) acc ^= dst; dst ^= acc; acc ^= dst;
Imprint / Impressum