From 61ae08f73d099d792fd57d6663e2148093fab17b Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Sun, 17 Nov 2013 19:52:46 -0500 Subject: [PATCH] Fix bug with MOV DPTR,#data16 instruction Source variable was 8 bits instead of 16 bits. --- src/opcode2c.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.20.1