From: Hugo Villeneuve Date: Mon, 18 Nov 2013 00:52:46 +0000 (-0500) Subject: Fix bug with MOV DPTR,#data16 instruction X-Git-Tag: v2.0.0~81 X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=61ae08f73d099d792fd57d6663e2148093fab17b;p=emu8051.git Fix bug with MOV DPTR,#data16 instruction Source variable was 8 bits instead of 16 bits. --- diff --git a/src/opcode2c.pl b/src/opcode2c.pl index 0cfbf34..270112a 100755 --- 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