]> Untitled Git - emu8051.git/commitdiff
Fix regression with ADDC instruction
authorHugo Villeneuve <hugo@hugovil.com>
Fri, 3 Jan 2014 06:32:19 +0000 (01:32 -0500)
committerHugo Villeneuve <hugo@hugovil.com>
Fri, 3 Jan 2014 06:58:18 +0000 (01:58 -0500)
Introduced when refactoring code with psw_set_ov() function.

src/common/opcode2c.pl

index 035c71809b22790687c49211b8269ebcd654b10f..8b90af8737c4ba52826c6bf28c4ac2677fc5d0a0 100755 (executable)
@@ -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();");