summaryrefslogtreecommitdiff
path: root/bootloader/bootloader-947.asm
diff options
context:
space:
mode:
Diffstat (limited to 'bootloader/bootloader-947.asm')
-rw-r--r--bootloader/bootloader-947.asm24
1 files changed, 9 insertions, 15 deletions
diff --git a/bootloader/bootloader-947.asm b/bootloader/bootloader-947.asm
index 6c24b29..72cee90 100644
--- a/bootloader/bootloader-947.asm
+++ b/bootloader/bootloader-947.asm
@@ -29,7 +29,6 @@
;; -------------------------------------
;; DEFINES (chip/com specific)
-#define BOOTPIN PORTC,7
USERVECT EQU H'200'
ISRVECT EQU USERVECT + H'4'
FLASH_BOUNDARY EQU b'00011111' ; flash write boundary is at 32 bytes boundaries
@@ -69,9 +68,7 @@ cnt EQU H'007F'
;; Boot Macro
bootmacro macro
- ;; btfsc BOOTPIN
- ;; goto USERVECT
- goto com_init
+ goto preinit
endm
;; for compatibility with older MCUs
@@ -86,6 +83,13 @@ bootmacro macro
;; Bootloader init
#include "generic-init.inc"
+preinit
+ movlb .3
+ bcf ANSELB,ANSB1
+ movlb .0
+ btfsc PORTB,1
+ goto USERVECT
+ goto com_init
;; -------------------------------------
;; Bootloader (com specific subroutines and init)
#include "com-16f1847-uart.inc"
@@ -102,17 +106,7 @@ bootmacro macro
;; -------------------------------------
;; dummy user code
org USERVECT
- movlb .1
- movlw b'11111110'
- movwf TRISB
- movlb .0
-userloop
- call com_rx_byte
- call com_tx_byte
- movlw b'00000001'
- xorwf PORTB,f
- goto userloop
- ;; goto USERVECT
+ goto USERVECT
;; -------------------------------------
;; END