diff --git a/avr/flash.asm b/avr/flash.asm index a5574bc..e911bc1 100644 --- a/avr/flash.asm +++ b/avr/flash.asm @@ -1,19 +1,5 @@ -; *************************************************************************** -; data - - -.dseg - -flashDataBegin: - flashCurrentAddress: .byte 2 - flashLastReceivedMsg: .byte 2 -flashDataEnd: - - - - ; *************************************************************************** ; code @@ -31,7 +17,7 @@ Flash_StartPage: push zh push zl ldi r16, ((PAGESIZE*2)-1) - and r16, zl + and zl, r16 rcall Flash_ReadPageIntoPageBuffer pop zl pop zh @@ -47,7 +33,7 @@ Flash_StartPage: Flash_FinishPage: ldi r16, ((PAGESIZE*2)-1) - and r16, zl + and zl, r16 rcall Flash_ErasePage rcall Flash_WritePage ret @@ -76,7 +62,7 @@ Flash_ReadPageIntoPageBuffer_loop: ldi r20, (1<