--- podex-orig.s Wed Sep 28 17:42:12 2005 +++ podex.s Wed Sep 28 13:25:58 2005 @@ -16,6 +16,8 @@ ;; ;; Kevin Ross' BDM12 v4.7 compatible protocol ;; + ;; 2005.09.28 + ;; - corrected address increment errors in MEMDUMP and MEMPUT .file "podex.s" .arch at90s2313 @@ -504,8 +506,10 @@ ldi r16,READ_WORD rcall hw_read_cmd ; read mem(wAddress) rcall pod_tx_word ; send to PC - add r21,1 ; wAddress++ - adc r20,0 + ldi r25,2 + ldi r24,0 + add r21,r25 ; wAddress += 2 + adc r20,r24 subi r19,1 brsh pod_ext_03_lp subi r18,1 @@ -573,8 +577,10 @@ rcall pod_rx mov r23,r17 ; get word to r22:r23 rcall hw_write_cmd ; write to mem(wAddress) - add r21,1 ; wAddress++ - adc r20,0 + ldi r25,2 + ldi r24,0 + add r21,r25 ; wAddress += 2 + adc r20,r24 subi r19,1 ; decrement wCount-er brsh pod_ext_06_lp subi r18,1