亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? bootldr3.asm

?? pic bootloader 用于PIC單片機(jī)的主程序下載
?? ASM
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
        goto    CheckLineDone   ;check for rollover
        incf    AddressH,F      ;if so then increment high address byte

CheckLineDone:
        decfsz  Counter,F       ;check if all words have been programmed
        goto    CheckAddress    ;if not then go program next word

;-----------------------------------------------------------------------------
;Done programming line of file

LineDone:
        movlw   '.'             ; line has been programmed so
        call    SerialTransmit  ; transmit progress indicator back
        call    SerialReceive   ; eat the trailing CR (hopefully!)
        goto    GetNewLine      ; go get next line hex file


;
;  Control reaches this point after loading a file.  Change the
;  status indicator to show that a legal file has been loaded,
;  then issue the success indicator and return to the top for
;  the next command.
;

FileDone:
File1:
        call    SerialReceive   ; need to eat checksum for file record
        xorlw   0x0d            ; hit the CR yet?
        btfsc   STATUS,Z
        goto    File2           ; got the CR, finish the report
        xorlw   0x0d            ; need to echo, restore the char
        call    SerialTransmit  ; do the echo
        goto    File1           ; loop until CR

File2:
        call    LoadStatusAddr  ;load address of CodeStatus word
        clrf    EEDATH          ;load data to indicate program exists
        clrf    EEDATA          ;load data to indicate program exists
        call    FlashWrite

        call    SendCRLF
        movlw   'O'             ; show success
        call    SerialTransmit
        movlw   'K'
        call    SerialTransmit

        goto    GetNewLine


;
;  An error occurred in the file download.  Send an error
;  indicator, then return to the top for another command.
;

ErrorMessage:
        call    SendCRLF
        movlw   '!'                     ; show failure
        call    SerialTransmit
        call    SerialTransmit
        goto    GetNewLine


;
;  Control reaches this point to process the GO command.  Check for
;  a valid file (CodeStatus).  If OK, jump to user program, otherwise,
;  send an error code.  Note that this code is copied from the code at
;  Main that runs on power-up in user mode.
;
;  There are two forms of this command:
;
;  G <CR>       code status must be good before jump to user code.
;  G! <CR>      jumps to user code WITHOUT checking code status  
;
;  Note that the G! form forces the CodeStatus word to 0 before jumping
;  to the user code.  This means subsequent resets with the bootloader
;  select line high will also jump to user code.  There had better be
;  something there!
;

DoGoCmd:
        call    SerialReceive           ; get next char
        xorlw   0x0d                    ; check it
        btfss   STATUS,Z
        goto    GoCmd1                  ; no CR, might be !
        call    SendCRLF                ; echo CR and LF
        call    LoadStatusAddr          ; load address of CodeStatus word
        call    FlashRead               ; read data at CodeStatus location
        Bank2                           ; change from bank3 to bank2
        movf    EEDATA,F                ; set Z flag if data is zero
        Bank0                           ; change from bank2 to bank0
        btfsc   STATUS,Z                ; skip if code status is bad
        goto    StartUserCode           ; run the user program

        call    SendCRLF                ; make it pretty
        movlw   'N'                     ; get the failure marker
        call    SerialTransmit          ; send it
        movlw   'O'                     ; get rest of marker
        call    SerialTransmit          ; send it
        goto    GetNewLine              ; back to the top

GoCmd1:
        xorlw   0x0d                    ; restore char
        xorlw   '!'                     ; force char?
        btfss   STATUS,Z
        goto    EatLine                 ; not !, must be trash...
        movlw   '!'                     ; need to echo
        call    SerialTransmit          ;
        call    SerialReceive           ; get next char
        xorlw   0x0d                    ; better be CR
        btfss   STATUS,Z
        goto    EatLine                 ; no CR, ignore it
        call    SendCRLF                ; echo CR and LF
        call    LoadStatusAddr          ;load address of CodeStatus word
        clrf    EEDATH                  ;load data to indicate program exists
        clrf    EEDATA                  ;load data to indicate program exists
        call    FlashWrite
        goto    StartUserCode           ; run the user program (hopefully)

        

;
;  SendCRLF      send a CR/LF sequence
;

SendCRLF:
        movlw   0x0d                    ; CR
        call    SerialTransmit
        movlw   0x0a                    ; LF
        call    SerialTransmit
        return


;
;  SendByte      send a byte as two hex characters
;

SendByte:
        movwf   Temp                    ; save a copy
        swapf   Temp,w                  ; move top nybble to w
        call    outnyb                  ; send it
        movf    Temp,w                  ; move low nybble to w
        call    outnyb                  ; send and return
        return

;
;  outnyb      send low nybble of w as hex to serial port
;

outnyb:
        andlw   0x0f            ; leave only low 4 bits
        addlw   -.10            ; test against 9
        btfsc   STATUS,C        ; skip if value was <= 9
        addlw   7               ; 10 or more, adjust to hex
        addlw   .10             ; restore value
        addlw   '0'             ; make it ascii
        call    SerialTransmit  ; and send it
        return



;
;  LoadStatusAddr      load address of CodeStatus word to flash addr regs
;
;  This routine returns in bank2.
;

LoadStatusAddr:
        Bank2                   ;change from bank0 to bank2
        movlw   high CodeStatus ;load high addr of CodeStatus location
        movwf   EEADRH
        movlw   low CodeStatus  ;load low addr of CodeStatus location
        movwf   EEADR
        return


;
;  GetHexByte      get two ASCII digits, convert to a byte
;
;  This routine reads and echoes two characters from the USART
;  and converts them to a single byte, returned in W.  No check
;  is made for legality.  The byte is added to the checksum.
;  This routine returns in bank0.

GetHexByte:
        call    SerialReceive   ;get new byte from serial port
        call    SerialTransmit  ;echo the character
        addlw   0xbf            ;add -'A' to Ascii high byte
        btfss   STATUS,C        ;check if positive
        addlw   0x07            ;if not, add 17 ('0' to '9')
        addlw   0x0a            ;else add 10 ('A' to 'F') 
        movwf   HexByte         ;save nibble
        swapf   HexByte,F       ;move nibble to high position

        call    SerialReceive   ;get new byte from serial port
        call    SerialTransmit  ;echo the character
        addlw   0xbf            ;add -'A' to Ascii low byte
        btfss   STATUS,C        ;check if positive
        addlw   0x07            ;if not, add 17 ('0' to '9')
        addlw   0x0a            ;else add 10 ('A' to 'F') 
        iorwf   HexByte,F       ;add low nibble to high nibble
        movf    HexByte,W       ;put result in W reg
        addwf   Checksum,F      ;add to cumulative checksum
        return

;
;  SerialSetup      initialize the USART
;
;  Configure the USART for transmit and receive at the default
;  baud rate.
;
;  Note that this routine returns with the banking registers set
;  for bank0.
;

SerialSetup:
        Bank1
        movlw   BAUD_DEFAULT    ;set baud rate 
        movwf   SPBRG
        bsf     TXSTA,BRGH      ;baud rate high speed option
        bsf     TXSTA,TXEN      ;enable transmission
        Bank0                   ;change from bank1 to bank0
        bsf     RCSTA,CREN      ;enable reception
        bsf     RCSTA,SPEN      ;enable serial port
        return


;
;  SerialReceive      read a byte from USART, return it in W
;
;  Note that this routine returns with the banking registers set
;  for bank0.
;

SerialReceive:
        Bank0                   ;change from unknown bank to bank0
        btfss   PIR1,RCIF       ;check if data received
        goto    $-1             ;wait until new data
        movf    RCREG,W         ;get received data into W
        return


;
;  SerialTransmit      transmit byte in W register from USART
;
;  Note that this routine returns with the banking registers set
;  for bank0.
;

SerialTransmit:
        Bank0                   ;change from unknown bank to bank0
        btfss   PIR1,TXIF       ;check that buffer is empty
        goto    $-1
        movwf   TXREG           ;transmit byte
        return


;
;  FlashWrite      write to a location in the flash program memory.
;
;  The calling routine should write the address of interest in EEADRH
;  and EEADR, and the data in EEDATH and EEDATA.
;
;  Note that this routine returns with the banking registers set
;  for bank3.
;

FlashWrite:
                Bank3                   ;change from bank2 to bank3
                movlw   0x84            ;enable writes to program flash
                movwf   EECON1

                movlw   0x55            ;do timed access writes
                movwf   EECON2
                movlw   0xaa
                movwf   EECON2
                bsf     EECON1,WR       ;begin writing to flash

                nop                     ;processor halts here while writing
                nop
                return

;-----------------------------------------------------------------------------
;
;  FlashRead      read from a location in the flash program memory
;
;  Address is in EEADRH and EEADR, data returned in EEDATH and EEDATA
;  This routine returns in bank3.
;

FlashRead:
                Bank2                   ; get it right
                movlw   0x1f            ; keep address within range
                andwf   EEADRH,F

                Bank3                   ; change from bank2 to bank3
                movlw   0x80            ; enable reads from program flash
                movwf   EECON1
                bsf     EECON1,RD       ; read from flash
                nop                     ; processor waits while reading
                nop
                return


;
;  The following instructions act as vectors to permit other programs
;  access to routines within the monitor.  Programs should execute
;  a CALL to one of these addresses, rather than a CALL directly to
;  the target routine, as the target routine might move in future
;  versions of this program!
;
;  Pay close attention to the banking when these routines exit, as
;  they often change the current register bank.
;
;  Note that entry to the Loader at $xxff should be via a GOTO, not
;  a CALL.
;

        org     StartOfBoot+0x1f8

        return                          ; $1ff8
        return                          ; $1ff9
        return                          ; $1ffa
        return                          ; $1ffb
        goto    SerialSetup             ; $1ffc
        goto    FlashRead               ; $1ffd
        goto    FlashWrite              ; $1ffe
        goto    Loader                  ; $1fff
        
;-----------------------------------------------------------------------------

                END

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产一区二区三区香蕉| 亚洲免费在线视频| 精品国产乱码久久久久久浪潮 | 91亚洲精品一区二区乱码| 国产在线一区二区综合免费视频| 日本欧美久久久久免费播放网| 日日摸夜夜添夜夜添精品视频 | 国产美女精品人人做人人爽| 久久99精品久久久久| 蜜臀久久99精品久久久画质超高清| 日韩成人dvd| 老汉av免费一区二区三区| 免费av网站大全久久| 激情深爱一区二区| 国产精一品亚洲二区在线视频| 国产精品综合久久| 成人性生交大片免费看中文| 成人黄色国产精品网站大全在线免费观看| 国产高清久久久久| av电影在线不卡| 色香蕉成人二区免费| 欧美亚洲免费在线一区| 884aa四虎影成人精品一区| 91精品国产91久久久久久最新毛片| 日韩三级视频在线看| 欧美精品一区二区三区视频| 国产欧美一区二区三区沐欲| 日韩码欧中文字| 亚洲男人的天堂av| 美腿丝袜亚洲综合| 成人午夜在线免费| 欧美日韩综合在线| 欧美精品一区二区三区蜜臀| 国产精品毛片无遮挡高清| 一区二区三区四区不卡在线| 欧美aⅴ一区二区三区视频| 福利视频网站一区二区三区| 在线视频欧美精品| 久久香蕉国产线看观看99| 亚洲视频一区二区在线| 美日韩黄色大片| 99精品欧美一区二区蜜桃免费 | 午夜视频在线观看一区二区三区| 免费不卡在线观看| 99国产精品久| 6080国产精品一区二区| 国产亚洲短视频| 亚洲国产欧美在线| 国产黄人亚洲片| 欧美酷刑日本凌虐凌虐| 国产亚洲精品超碰| 偷偷要91色婷婷| 国产成人综合自拍| 欧美日韩视频在线第一区| 久久网站最新地址| 午夜久久电影网| a级精品国产片在线观看| 4438x亚洲最大成人网| 中文乱码免费一区二区| 日韩成人免费电影| 99久久精品免费看国产| 欧美不卡在线视频| 亚洲国产日韩一区二区| 成人综合激情网| 91精品国产91综合久久蜜臀| 亚洲欧美激情插| 国产精品99久久久| 日韩片之四级片| 亚洲免费观看视频| 国产91精品入口| 欧美成人福利视频| 亚洲国产色一区| 91蝌蚪porny| 国产婷婷精品av在线| 麻豆精品在线播放| 欧美日韩大陆一区二区| 亚洲欧美日韩国产综合| 国产麻豆精品一区二区| 69堂国产成人免费视频| 一区二区视频在线| 不卡av在线网| 久久老女人爱爱| 精品一二线国产| 欧美精品自拍偷拍动漫精品| 亚洲一区视频在线| 99久久er热在这里只有精品66| 久久嫩草精品久久久久| 久久99热这里只有精品| 91精品国产综合久久国产大片| 亚洲一区二区偷拍精品| 色久优优欧美色久优优| 1区2区3区欧美| 成人精品高清在线| 国产三级三级三级精品8ⅰ区| 捆绑调教美女网站视频一区| 9191久久久久久久久久久| 亚洲国产精品一区二区久久| 色8久久精品久久久久久蜜| 亚洲三级电影网站| 91美女视频网站| 亚洲精品成a人| 在线视频一区二区三| 亚洲综合清纯丝袜自拍| 91黄视频在线| 亚洲国产精品久久不卡毛片| 欧美优质美女网站| 亚洲成人自拍一区| 欧美日本高清视频在线观看| 五月天欧美精品| 欧美一区二区三区四区在线观看| 日本强好片久久久久久aaa| 日韩亚洲欧美在线| 国模无码大尺度一区二区三区| 久久亚洲精品国产精品紫薇| 国产精品一二三| 中文字幕一区二区三区色视频| 99精品视频在线免费观看| 依依成人精品视频| 91精品国产综合久久香蕉的特点| 日韩精品电影一区亚洲| 精品少妇一区二区三区日产乱码 | 天天色天天操综合| 日韩一级免费观看| 国产成人av电影| 成人欧美一区二区三区视频网页 | 久久精品人人做人人爽97 | 亚洲国产成人一区二区三区| 99热在这里有精品免费| 亚洲自拍偷拍麻豆| 日韩西西人体444www| 国内偷窥港台综合视频在线播放| 中文字幕欧美激情| 欧美性生活久久| 极品美女销魂一区二区三区| 国产精品理论片在线观看| 一本久久综合亚洲鲁鲁五月天| 亚洲国产精品久久久男人的天堂| 日韩欧美在线综合网| 成人影视亚洲图片在线| 一区二区三区在线免费观看| 欧美日韩在线免费视频| 精品一区二区三区欧美| 国产精品电影一区二区三区| 欧美日韩亚洲综合在线 | 3d成人动漫网站| 国产精品小仙女| 亚洲精品videosex极品| 日韩精品一区二区三区四区视频| 成人综合激情网| 亚洲成人先锋电影| 国产蜜臀97一区二区三区| 在线观看一区不卡| 国产原创一区二区三区| 亚洲丝袜自拍清纯另类| 日韩精品一区二区在线| 91成人在线观看喷潮| 国产成人8x视频一区二区| 亚洲高清免费视频| 中文字幕乱码一区二区免费| 欧美欧美欧美欧美首页| 97se亚洲国产综合自在线观| 久久爱另类一区二区小说| 亚洲综合精品久久| 久久理论电影网| 欧美福利视频导航| 99综合电影在线视频| 蜜臀国产一区二区三区在线播放 | 日本网站在线观看一区二区三区 | 福利一区在线观看| 日本vs亚洲vs韩国一区三区| 综合久久综合久久| 精品国产人成亚洲区| 在线观看免费成人| 成人免费的视频| 精品一区二区综合| 亚洲成人精品一区二区| 亚洲欧洲精品成人久久奇米网| 日韩精品一区二| 欧美色偷偷大香| 成人丝袜高跟foot| 国产一区二区视频在线| 日本欧美一区二区三区乱码| 亚洲成人免费视| 一区二区免费在线播放| 国产精品久久免费看| 久久久久成人黄色影片| 精品福利av导航| 日韩一区二区中文字幕| 欧美精品1区2区3区| 91久久精品一区二区三| 成人看片黄a免费看在线| 国产剧情在线观看一区二区| 蜜臀va亚洲va欧美va天堂| 亚洲gay无套男同| 夜夜爽夜夜爽精品视频| 亚洲欧洲制服丝袜| 亚洲欧美日韩国产综合| 中文字幕五月欧美| 亚洲视频你懂的| 综合色天天鬼久久鬼色|