summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2015-05-24 15:49:49 +0200
committer hap <happppp@users.noreply.github.com>2015-05-24 15:49:49 +0200
commit832bab865a72d55472816211c22a73252de9add2 (patch)
tree0300cbc73f1795bcc371f759414b5e86631de46c
parent04d62127061956a86d808cbd8bde3b70ae7dcbd0 (diff)
ugly whitespace cleanup
-rw-r--r--src/emu/cpu/i8085/i8085cpu.h178
1 files changed, 89 insertions, 89 deletions
diff --git a/src/emu/cpu/i8085/i8085cpu.h b/src/emu/cpu/i8085/i8085cpu.h
index f93e9943386..5ccecf3cd95 100644
--- a/src/emu/cpu/i8085/i8085cpu.h
+++ b/src/emu/cpu/i8085/i8085cpu.h
@@ -41,26 +41,26 @@
#define M_MVI(R) R=ARG()
/* rotate */
-#define M_RLC { \
- m_AF.b.h = (m_AF.b.h << 1) | (m_AF.b.h >> 7); \
- m_AF.b.l = (m_AF.b.l & 0xfe) | (m_AF.b.h & CF); \
+#define M_RLC { \
+ m_AF.b.h = (m_AF.b.h << 1) | (m_AF.b.h >> 7); \
+ m_AF.b.l = (m_AF.b.l & 0xfe) | (m_AF.b.h & CF); \
}
-#define M_RRC { \
- m_AF.b.l = (m_AF.b.l & 0xfe) | (m_AF.b.h & CF); \
- m_AF.b.h = (m_AF.b.h >> 1) | (m_AF.b.h << 7); \
+#define M_RRC { \
+ m_AF.b.l = (m_AF.b.l & 0xfe) | (m_AF.b.h & CF); \
+ m_AF.b.h = (m_AF.b.h >> 1) | (m_AF.b.h << 7); \
}
-#define M_RAL { \
- int c = m_AF.b.l&CF; \
- m_AF.b.l = (m_AF.b.l & 0xfe) | (m_AF.b.h >> 7); \
- m_AF.b.h = (m_AF.b.h << 1) | c; \
+#define M_RAL { \
+ int c = m_AF.b.l&CF; \
+ m_AF.b.l = (m_AF.b.l & 0xfe) | (m_AF.b.h >> 7); \
+ m_AF.b.h = (m_AF.b.h << 1) | c; \
}
-#define M_RAR { \
- int c = (m_AF.b.l&CF) << 7; \
- m_AF.b.l = (m_AF.b.l & 0xfe) | (m_AF.b.h & CF); \
- m_AF.b.h = (m_AF.b.h >> 1) | c; \
+#define M_RAR { \
+ int c = (m_AF.b.l&CF) << 7; \
+ m_AF.b.l = (m_AF.b.l & 0xfe) | (m_AF.b.h & CF); \
+ m_AF.b.h = (m_AF.b.h >> 1) | c; \
}
/* logical */
@@ -73,116 +73,116 @@
#define M_DCR(R) {UINT8 hc = ((R & 0x0f) != 0x00) ? HF : 0; --R; m_AF.b.l= (m_AF.b.l & CF ) | ZSP[R] | hc | VF; }
/* arithmetic */
-#define M_ADD(R) { \
- int q = m_AF.b.h+R; \
- m_AF.b.l=ZSP[q&255]|((q>>8)&CF)|((m_AF.b.h^q^R)&HF); \
- m_AF.b.h=q; \
+#define M_ADD(R) { \
+ int q = m_AF.b.h+R; \
+ m_AF.b.l=ZSP[q&255]|((q>>8)&CF)|((m_AF.b.h^q^R)&HF); \
+ m_AF.b.h=q; \
}
-#define M_ADC(R) { \
- int q = m_AF.b.h+R+(m_AF.b.l&CF); \
- m_AF.b.l=ZSP[q&255]|((q>>8)&CF)|((m_AF.b.h^q^R)&HF); \
- m_AF.b.h=q; \
+#define M_ADC(R) { \
+ int q = m_AF.b.h+R+(m_AF.b.l&CF); \
+ m_AF.b.l=ZSP[q&255]|((q>>8)&CF)|((m_AF.b.h^q^R)&HF); \
+ m_AF.b.h=q; \
}
-#define M_SUB(R) { \
- int q = m_AF.b.h-R; \
- m_AF.b.l=ZSP[q&255]|((q>>8)&CF)|(~(m_AF.b.h^q^R)&HF)|VF; \
- m_AF.b.h=q; \
+#define M_SUB(R) { \
+ int q = m_AF.b.h-R; \
+ m_AF.b.l=ZSP[q&255]|((q>>8)&CF)|(~(m_AF.b.h^q^R)&HF)|VF; \
+ m_AF.b.h=q; \
}
-#define M_SBB(R) { \
- int q = m_AF.b.h-R-(m_AF.b.l&CF); \
- m_AF.b.l=ZSP[q&255]|((q>>8)&CF)|(~(m_AF.b.h^q^R)&HF)|VF; \
- m_AF.b.h=q; \
+#define M_SBB(R) { \
+ int q = m_AF.b.h-R-(m_AF.b.l&CF); \
+ m_AF.b.l=ZSP[q&255]|((q>>8)&CF)|(~(m_AF.b.h^q^R)&HF)|VF; \
+ m_AF.b.h=q; \
}
-#define M_CMP(R) { \
- int q = m_AF.b.h-R; \
- m_AF.b.l=ZSP[q&255]|((q>>8)&CF)|(~(m_AF.b.h^q^R)&HF)|VF; \
+#define M_CMP(R) { \
+ int q = m_AF.b.h-R; \
+ m_AF.b.l=ZSP[q&255]|((q>>8)&CF)|(~(m_AF.b.h^q^R)&HF)|VF; \
}
-#define M_DAD(R) { \
- int q = m_HL.d + m_##R.d; \
- m_AF.b.l = (m_AF.b.l & ~CF) | (q>>16 & CF ); \
- m_HL.w.l = q; \
+#define M_DAD(R) { \
+ int q = m_HL.d + m_##R.d; \
+ m_AF.b.l = (m_AF.b.l & ~CF) | (q>>16 & CF ); \
+ m_HL.w.l = q; \
}
// DSUB is 8085-only, not sure if H flag handling is correct
-#define M_DSUB() { \
- int q = m_HL.b.l-m_BC.b.l; \
- m_AF.b.l=ZS[q&255]|((q>>8)&CF)|VF| \
- ((m_HL.b.l^q^m_BC.b.l)&HF)| \
- (((m_BC.b.l^m_HL.b.l)&(m_HL.b.l^q)&SF)>>5); \
- m_HL.b.l=q; \
- q = m_HL.b.h-m_BC.b.h-(m_AF.b.l&CF); \
- m_AF.b.l=ZS[q&255]|((q>>8)&CF)|VF| \
- ((m_HL.b.h^q^m_BC.b.h)&HF)| \
- (((m_BC.b.h^m_HL.b.h)&(m_HL.b.h^q)&SF)>>5); \
- if (m_HL.b.l!=0) m_AF.b.l&=~ZF; \
+#define M_DSUB() { \
+ int q = m_HL.b.l-m_BC.b.l; \
+ m_AF.b.l=ZS[q&255]|((q>>8)&CF)|VF| \
+ ((m_HL.b.l^q^m_BC.b.l)&HF)| \
+ (((m_BC.b.l^m_HL.b.l)&(m_HL.b.l^q)&SF)>>5); \
+ m_HL.b.l=q; \
+ q = m_HL.b.h-m_BC.b.h-(m_AF.b.l&CF); \
+ m_AF.b.l=ZS[q&255]|((q>>8)&CF)|VF| \
+ ((m_HL.b.h^q^m_BC.b.h)&HF)| \
+ (((m_BC.b.h^m_HL.b.h)&(m_HL.b.h^q)&SF)>>5); \
+ if (m_HL.b.l!=0) m_AF.b.l&=~ZF; \
}
/* i/o */
-#define M_IN \
- m_STATUS = 0x42; \
- m_WZ.d=ARG(); \
+#define M_IN \
+ m_STATUS = 0x42; \
+ m_WZ.d=ARG(); \
m_AF.b.h=m_io->read_byte(m_WZ.d);
-#define M_OUT \
- m_STATUS = 0x10; \
- m_WZ.d=ARG(); \
+#define M_OUT \
+ m_STATUS = 0x10; \
+ m_WZ.d=ARG(); \
m_io->write_byte(m_WZ.d,m_AF.b.h)
/* stack */
-#define M_PUSH(R) { \
- m_STATUS = 0x04; \
+#define M_PUSH(R) { \
+ m_STATUS = 0x04; \
m_program->write_byte(--m_SP.w.l, m_##R.b.h); \
m_program->write_byte(--m_SP.w.l, m_##R.b.l); \
}
-#define M_POP(R) { \
- m_STATUS = 0x86; \
+#define M_POP(R) { \
+ m_STATUS = 0x86; \
m_##R.b.l = m_program->read_byte(m_SP.w.l++); \
m_##R.b.h = m_program->read_byte(m_SP.w.l++); \
}
/* jumps */
// On 8085 jump if condition is not satisfied is shorter
-#define M_JMP(cc) { \
- if (cc) { \
- m_PC.w.l = ARG16(); \
- } else { \
- m_PC.w.l += 2; \
- m_icount += (IS_8085()) ? 3 : 0; \
- } \
+#define M_JMP(cc) { \
+ if (cc) { \
+ m_PC.w.l = ARG16(); \
+ } else { \
+ m_PC.w.l += 2; \
+ m_icount += (IS_8085()) ? 3 : 0; \
+ } \
}
// On 8085 call if condition is not satisfied is 9 ticks
-#define M_CALL(cc) \
-{ \
- if (cc) \
- { \
- UINT16 a = ARG16(); \
- m_icount -= (IS_8085()) ? 7 : 6 ; \
- M_PUSH(PC); \
- m_PC.d = a; \
- } else { \
- m_PC.w.l += 2; \
- m_icount += (IS_8085()) ? 2 : 0; \
- } \
+#define M_CALL(cc) \
+{ \
+ if (cc) \
+ { \
+ UINT16 a = ARG16(); \
+ m_icount -= (IS_8085()) ? 7 : 6 ; \
+ M_PUSH(PC); \
+ m_PC.d = a; \
+ } else { \
+ m_PC.w.l += 2; \
+ m_icount += (IS_8085()) ? 2 : 0; \
+ } \
}
// conditional RET only
-#define M_RET(cc) \
-{ \
- if (cc) \
- { \
- m_icount -= 6; \
- M_POP(PC); \
- } \
-}
-
-#define M_RST(nn) { \
- M_PUSH(PC); \
- m_PC.d = 8 * nn; \
+#define M_RET(cc) \
+{ \
+ if (cc) \
+ { \
+ m_icount -= 6; \
+ M_POP(PC); \
+ } \
+}
+
+#define M_RST(nn) { \
+ M_PUSH(PC); \
+ m_PC.d = 8 * nn; \
}