From: Hugo Villeneuve Date: Fri, 3 Jan 2014 06:32:19 +0000 (-0500) Subject: Fix regression with ADDC instruction X-Git-Tag: v2.0.0~23 X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=1590b0711fd7136cf7dc87f571557647c00ae189;p=emu8051.git Fix regression with ADDC instruction Introduced when refactoring code with psw_set_ov() function. --- diff --git a/src/common/opcode2c.pl b/src/common/opcode2c.pl index 035c718..8b90af8 100755 --- a/src/common/opcode2c.pl +++ b/src/common/opcode2c.pl @@ -491,7 +491,7 @@ for ($i=0 ; $i< 256; $i++) { cfw("psw_clr_ov();"); cfw("if ( destination + source + carryflag > 0xFF ) {"); cfw(" psw_set_cy();"); - cfw(" if (((destination & 0x7F) + (source & 0x7F) + carryflag) < 0x80);"); + cfw(" if (((destination & 0x7F) + (source & 0x7F) + carryflag) < 0x80)"); cfw(" psw_set_ov();"); cfw("} else if (((destination & 0x7F) + (source & 0x7F) + carryflag) > 0x7F) psw_set_ov();"); cfw("if (((destination & 0x0F) + (source & 0x0F) + carryflag) > 0x0F) psw_set_ac();");