projects
/
emu8051.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47852ae
)
Fix bug with MOV DPTR,#data16 instruction
author
Hugo Villeneuve
<hugo@hugovil.com>
Mon, 18 Nov 2013 00:52:46 +0000
(19:52 -0500)
committer
Hugo Villeneuve
<hugo@hugovil.com>
Mon, 18 Nov 2013 03:22:48 +0000
(22:22 -0500)
Source variable was 8 bits instead of 16 bits.
src/opcode2c.pl
patch
|
blob
|
history
diff --git
a/src/opcode2c.pl
b/src/opcode2c.pl
index
0cfbf34
..
270112a
100755
(executable)
--- a/
src/opcode2c.pl
+++ b/
src/opcode2c.pl
@@
-376,7
+376,7
@@
for ($i=0 ; $i< 256; $i++) {
cfw("unsigned int source = memory_sfr_read_dptr();");
}
if ($op_source == 22) { # #data16
- cfw("unsigned
char
source = ( memory_read8( PGM_MEM_ID, (cpu8051.pc)++ ) << 8 );");
+ cfw("unsigned
int
source = ( memory_read8( PGM_MEM_ID, (cpu8051.pc)++ ) << 8 );");
cfw("source += memory_read8( PGM_MEM_ID, (cpu8051.pc)++ );");
}
if ($op_source == 23) { # /bitaddr