From 4989a7cd78eb2ba6f3cfb5c02913d9c18e9e2aeb Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 7 Jul 2013 21:49:09 +0000 Subject: address boundary check after bootloader check git-svn-id: https://svn.spreadspace.org/pic/trunk@52 a09c6847-51d9-44de-8ef2-e725cf50f3c7 --- bootloader/bootloader.asm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bootloader/bootloader.asm') diff --git a/bootloader/bootloader.asm b/bootloader/bootloader.asm index db177af..531c3d8 100644 --- a/bootloader/bootloader.asm +++ b/bootloader/bootloader.asm @@ -392,13 +392,13 @@ read_flash_segment_next ;; flash write -------- write_flash_segment + movf combuff + .3,f ; if addr[15:8] == 0 -> boot loader section + btfsc STATUS,Z + goto address_prohibited movlw FLASH_BOUNDARY ; addr on boundary? andwf combuff + .2,w btfss STATUS,Z goto address_invalid - movf combuff + .3,f ; if addr[15:8] == 0 -> boot loader section - btfsc STATUS,Z - goto address_prohibited movlw FSS ; initialize EEADR:EEADRH and FSR movwf cnt1 movlw b'01011000' -- cgit v1.2.3