comparison src/external_flash.asm @ 167:05f2100d2eb8

logbook
author heinrichsweikamp
date Sun, 28 Sep 2014 22:27:39 +0200
parents 13cda523891f
children 653a3ab08062
comparison
equal deleted inserted replaced
166:30ebaf72170d 167:05f2100d2eb8
27 addwfc ext_flash_address+2,F 27 addwfc ext_flash_address+2,F
28 28
29 movlw 0x40 29 movlw 0x40
30 cpfseq ext_flash_address+2 ; at address 40FFFF? 30 cpfseq ext_flash_address+2 ; at address 40FFFF?
31 return ; No, return 31 return ; No, return
32 clrf ext_flash_address+0 ; Yes, rollover to 0x000000 32 ; clrf ext_flash_address+0
33 clrf ext_flash_address+1 33 ; clrf ext_flash_address+1
34 clrf ext_flash_address+2 34 clrf ext_flash_address+2 ; Yes, rollover to 0x000000
35 return 35 return
36 36
37 global incf_ext_flash_address0_p1_0x20 37 global incf_ext_flash_address0_p1_0x20
38 incf_ext_flash_address0_p1_0x20: ; Increase by one 38 incf_ext_flash_address0_p1_0x20: ; Increase by one
39 movlw .1 39 movlw .1
46 addwfc ext_flash_address+2,F 46 addwfc ext_flash_address+2,F
47 47
48 movlw 0x20 48 movlw 0x20
49 cpfseq ext_flash_address+2 ; at address 0x200000? 49 cpfseq ext_flash_address+2 ; at address 0x200000?
50 return ; No, return 50 return ; No, return
51 clrf ext_flash_address+0 ; Yes, rollover to 0x000000 51 ; clrf ext_flash_address+0
52 clrf ext_flash_address+1 52 ; clrf ext_flash_address+1
53 clrf ext_flash_address+2 53 clrf ext_flash_address+2 ; Yes, rollover to 0x000000
54 return 54 return
55 55
56 global decf_ext_flash_address0 56 global decf_ext_flash_address0
57 decf_ext_flash_address0: 57 decf_ext_flash_address0:
58 subwf ext_flash_address+0,F ; decrease address: do a 16-8bits substract. 58 subwf ext_flash_address+0,F ; decrease address: do a 16-8bits substract.