From 1590b0711fd7136cf7dc87f571557647c00ae189 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Fri, 3 Jan 2014 01:32:19 -0500 Subject: [PATCH] Fix regression with ADDC instruction Introduced when refactoring code with psw_set_ov() function. --- src/common/opcode2c.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();"); -- 2.20.1