projects
/
emu8051.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
670bbd5
)
Fix error with ADDC instruction
author
Hugo Villeneuve
<hugo@hugovil.com>
Fri, 3 Jan 2014 07:36:17 +0000
(
02:36
-0500)
committer
Hugo Villeneuve
<hugo@hugovil.com>
Fri, 3 Jan 2014 07:36:17 +0000
(
02:36
-0500)
The carry flag was not added to the result.
src/common/opcode2c.pl
patch
|
blob
|
history
diff --git
a/src/common/opcode2c.pl
b/src/common/opcode2c.pl
index
8b90af8
..
c8d6bb5
100755
(executable)
--- a/
src/common/opcode2c.pl
+++ b/
src/common/opcode2c.pl
@@
-495,7
+495,7
@@
for ($i=0 ; $i< 256; $i++) {
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();");
- cfw("destination += source;");
+ cfw("destination += source
+ carryflag
;");
}
# JC