From 9dc641991f83c2f24d8631991b32390625bb2345 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 3 Sep 2018 21:16:26 +0100 Subject: [PATCH] cpuinfo: Fix scf check logic --- Applications/util/cpuinfo.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Applications/util/cpuinfo.c b/Applications/util/cpuinfo.c index d1867d19..26fe417c 100644 --- a/Applications/util/cpuinfo.c +++ b/Applications/util/cpuinfo.c @@ -98,12 +98,11 @@ no_port_idwork: bit 3,c ld a, #CPU_Z80_BM1 jr z, set_id - ld bc,#0xffff + ld bc,#0x00ff push bc - pop af - xor a - scf - nop + pop af /* Flags is now 0xFF A is 0. Now play with XF and YF */ + scf /* Will give us 0 for NEC clones, 28 for Zilog */ + nop /* (Turbo R will also show 28) */ push af pop bc ld a,c -- 2.34.1