new version
[Chiptunes-pms150c.git] / fakeasm.h
1 int flag_z = 0;
2 int flag_c = 0;
3 //ignoring flag_ov, flag_ac
4 #define MOV(dst, src) dst = src;
5 #define SL(dst) flag_c = (dst&0x80); dst <<= 1;
6 #define SR(dst) flag_c = (dst&0x01); dst >>= 1;
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);
10 #define CLEAR(dst) dst = 0;
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);
Imprint / Impressum