Advertisement
Guest User

Jarda Kopal PIC16F84a

a guest
Nov 11th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.94 KB | None | 0 0
  1. ;--------------------------------------------------------
  2. ; File Created by SDCC : free open source ANSI-C Compiler
  3. ; Version 3.9.4 #11411 (MINGW64)
  4. ;--------------------------------------------------------
  5. ; PIC port for the 14-bit core
  6. ;--------------------------------------------------------
  7. ; .file "main.c"
  8. list p=16f84a
  9. radix dec
  10. include "p16f84a.inc"
  11. ;--------------------------------------------------------
  12. ; external declarations
  13. ;--------------------------------------------------------
  14. extern _STATUSbits
  15. extern _PORTAbits
  16. extern _PORTBbits
  17. extern _INTCONbits
  18. extern _OPTION_REGbits
  19. extern _TRISAbits
  20. extern _TRISBbits
  21. extern _EECON1bits
  22. extern _INDF
  23. extern _TMR0
  24. extern _PCL
  25. extern _STATUS
  26. extern _FSR
  27. extern _PORTA
  28. extern _PORTB
  29. extern _EEDATA
  30. extern _EEADR
  31. extern _PCLATH
  32. extern _INTCON
  33. extern _OPTION_REG
  34. extern _TRISA
  35. extern _TRISB
  36. extern _EECON1
  37. extern _EECON2
  38. extern __sdcc_gsinit_startup
  39. ;--------------------------------------------------------
  40. ; global declarations
  41. ;--------------------------------------------------------
  42. global _Delays
  43. global _Delayus
  44. global _RF01_RDFIFO
  45. global _WriteCMD
  46. global _Write1
  47. global _Write0
  48. global _RF1_Init
  49. global _main
  50. global _RF_RXBUF
  51.  
  52. global PSAVE
  53. global SSAVE
  54. global WSAVE
  55. global STK12
  56. global STK11
  57. global STK10
  58. global STK09
  59. global STK08
  60. global STK07
  61. global STK06
  62. global STK05
  63. global STK04
  64. global STK03
  65. global STK02
  66. global STK01
  67. global STK00
  68.  
  69. sharebank udata_ovr 0x000C
  70. PSAVE res 1
  71. SSAVE res 1
  72. WSAVE res 1
  73. STK12 res 1
  74. STK11 res 1
  75. STK10 res 1
  76. STK09 res 1
  77. STK08 res 1
  78. STK07 res 1
  79. STK06 res 1
  80. STK05 res 1
  81. STK04 res 1
  82. STK03 res 1
  83. STK02 res 1
  84. STK01 res 1
  85. STK00 res 1
  86.  
  87. ;--------------------------------------------------------
  88. ; global definitions
  89. ;--------------------------------------------------------
  90. UD_main_0 udata
  91. _RF_RXBUF res 19
  92.  
  93. ;--------------------------------------------------------
  94. ; absolute symbol definitions
  95. ;--------------------------------------------------------
  96. ;--------------------------------------------------------
  97. ; compiler-defined variables
  98. ;--------------------------------------------------------
  99. UDL_main_0 udata
  100. r0x1022 res 1
  101. r0x1023 res 1
  102. r0x1024 res 1
  103. r0x1025 res 1
  104. r0x1026 res 1
  105. r0x1027 res 1
  106. r0x1028 res 1
  107. r0x1029 res 1
  108. r0x101F res 1
  109. r0x101E res 1
  110. r0x1020 res 1
  111. r0x1021 res 1
  112. r0x101B res 1
  113. r0x101C res 1
  114. r0x101D res 1
  115. r0x1014 res 1
  116. r0x1013 res 1
  117. r0x1015 res 1
  118. r0x1016 res 1
  119. r0x1017 res 1
  120. r0x1018 res 1
  121. r0x1019 res 1
  122. r0x101A res 1
  123. ;--------------------------------------------------------
  124. ; initialized data
  125. ;--------------------------------------------------------
  126. ;--------------------------------------------------------
  127. ; overlayable items in internal ram
  128. ;--------------------------------------------------------
  129. ; udata_ovr
  130. ;--------------------------------------------------------
  131. ; reset vector
  132. ;--------------------------------------------------------
  133. STARTUP code 0x0000
  134. nop
  135. pagesel __sdcc_gsinit_startup
  136. goto __sdcc_gsinit_startup
  137. ;--------------------------------------------------------
  138. ; code
  139. ;--------------------------------------------------------
  140. code_main code
  141. ;***
  142. ; pBlock Stats: dbName = M
  143. ;***
  144. ;has an exit
  145. ;functions called:
  146. ; _Delays
  147. ; _RF1_Init
  148. ; _WriteCMD
  149. ; _WriteCMD
  150. ; _WriteCMD
  151. ; _WriteCMD
  152. ; _WriteCMD
  153. ; _WriteCMD
  154. ; _WriteCMD
  155. ; _WriteCMD
  156. ; _WriteCMD
  157. ; _WriteCMD
  158. ; _WriteCMD
  159. ; _RF01_RDFIFO
  160. ; _WriteCMD
  161. ; _WriteCMD
  162. ; _Delayus
  163. ; _Delays
  164. ; _RF1_Init
  165. ; _WriteCMD
  166. ; _WriteCMD
  167. ; _WriteCMD
  168. ; _WriteCMD
  169. ; _WriteCMD
  170. ; _WriteCMD
  171. ; _WriteCMD
  172. ; _WriteCMD
  173. ; _WriteCMD
  174. ; _WriteCMD
  175. ; _WriteCMD
  176. ; _RF01_RDFIFO
  177. ; _WriteCMD
  178. ; _WriteCMD
  179. ; _Delayus
  180. ;9 compiler assigned registers:
  181. ; r0x1022
  182. ; STK00
  183. ; r0x1023
  184. ; r0x1024
  185. ; r0x1025
  186. ; r0x1026
  187. ; r0x1027
  188. ; r0x1028
  189. ; r0x1029
  190. ;; Starting pCode block
  191. S_main__main code
  192. _main:
  193. ; 2 exit points
  194. ; .line 41; "main.c" uchar i=0,j=0;
  195. CLRF r0x1022
  196. ; .line 43; "main.c" Delays();
  197. PAGESEL _Delays
  198. CALL _Delays
  199. PAGESEL $
  200. ; .line 44; "main.c" RF1_Init( );
  201. PAGESEL _RF1_Init
  202. CALL _RF1_Init
  203. PAGESEL $
  204. ; .line 45; "main.c" WriteCMD(0x0000);
  205. MOVLW 0x00
  206. MOVWF STK00
  207. MOVLW 0x00
  208. PAGESEL _WriteCMD
  209. CALL _WriteCMD
  210. PAGESEL $
  211. ; .line 46; "main.c" WriteCMD(0x898A);//433BAND,134kHz
  212. MOVLW 0x8a
  213. MOVWF STK00
  214. MOVLW 0x89
  215. PAGESEL _WriteCMD
  216. CALL _WriteCMD
  217. PAGESEL $
  218. ; .line 47; "main.c" WriteCMD(0xA640);//434MHz
  219. MOVLW 0x40
  220. MOVWF STK00
  221. MOVLW 0xa6
  222. PAGESEL _WriteCMD
  223. CALL _WriteCMD
  224. PAGESEL $
  225. ; .line 48; "main.c" WriteCMD(0xC847);//4.8kbps
  226. MOVLW 0x47
  227. MOVWF STK00
  228. MOVLW 0xc8
  229. PAGESEL _WriteCMD
  230. CALL _WriteCMD
  231. PAGESEL $
  232. ; .line 49; "main.c" WriteCMD(0xC69B);//AFC setting
  233. MOVLW 0x9b
  234. MOVWF STK00
  235. MOVLW 0xc6
  236. PAGESEL _WriteCMD
  237. CALL _WriteCMD
  238. PAGESEL $
  239. ; .line 50; "main.c" WriteCMD(0xC42A);//Clock recovery manual control,Digital filter,DQD=4
  240. MOVLW 0x2a
  241. MOVWF STK00
  242. MOVLW 0xc4
  243. PAGESEL _WriteCMD
  244. CALL _WriteCMD
  245. PAGESEL $
  246. ; .line 51; "main.c" WriteCMD(0xC240);//output 1.66MHz
  247. MOVLW 0x40
  248. MOVWF STK00
  249. MOVLW 0xc2
  250. PAGESEL _WriteCMD
  251. CALL _WriteCMD
  252. PAGESEL $
  253. ; .line 52; "main.c" WriteCMD(0xC080);
  254. MOVLW 0x80
  255. MOVWF STK00
  256. MOVLW 0xc0
  257. PAGESEL _WriteCMD
  258. CALL _WriteCMD
  259. PAGESEL $
  260. ; .line 53; "main.c" WriteCMD(0xCE88);//use FIFO
  261. MOVLW 0x88
  262. MOVWF STK00
  263. MOVLW 0xce
  264. PAGESEL _WriteCMD
  265. CALL _WriteCMD
  266. PAGESEL $
  267. ; .line 54; "main.c" WriteCMD(0xCE8B);
  268. MOVLW 0x8b
  269. MOVWF STK00
  270. MOVLW 0xce
  271. PAGESEL _WriteCMD
  272. CALL _WriteCMD
  273. PAGESEL $
  274. ; .line 55; "main.c" WriteCMD(0xC081);//OPEN RX
  275. MOVLW 0x81
  276. MOVWF STK00
  277. MOVLW 0xc0
  278. PAGESEL _WriteCMD
  279. CALL _WriteCMD
  280. PAGESEL $
  281. _00114_DS_:
  282. ; .line 58; "main.c" while(!nIRQ)
  283. BANKSEL _PORTBbits
  284. BTFSC _PORTBbits,1
  285. GOTO _00114_DS_
  286. ; .line 60; "main.c" RF_RXBUF[i++]=RF01_RDFIFO();
  287. MOVF r0x1022,W
  288. MOVWF r0x1023
  289. INCF r0x1022,F
  290. MOVF r0x1023,W
  291. ADDLW (_RF_RXBUF + 0)
  292. MOVWF r0x1023
  293. MOVLW high (_RF_RXBUF + 0)
  294. BTFSC STATUS,0
  295. ADDLW 0x01
  296. MOVWF r0x1024
  297. PAGESEL _RF01_RDFIFO
  298. CALL _RF01_RDFIFO
  299. PAGESEL $
  300. MOVWF r0x1025
  301. MOVF r0x1023,W
  302. MOVWF FSR
  303. BCF STATUS,7
  304. BTFSC r0x1024,0
  305. BSF STATUS,7
  306. MOVF r0x1025,W
  307. MOVWF INDF
  308. ; .line 61; "main.c" if(i==17)
  309. MOVF r0x1022,W
  310. XORLW 0x11
  311. BTFSS STATUS,2
  312. GOTO _00114_DS_
  313. ; .line 63; "main.c" i=0;
  314. CLRF r0x1022
  315. ; .line 64; "main.c" WriteCMD(0xCE88);
  316. MOVLW 0x88
  317. MOVWF STK00
  318. MOVLW 0xce
  319. PAGESEL _WriteCMD
  320. CALL _WriteCMD
  321. PAGESEL $
  322. ; .line 65; "main.c" WriteCMD(0xCE8B);
  323. MOVLW 0x8b
  324. MOVWF STK00
  325. MOVLW 0xce
  326. PAGESEL _WriteCMD
  327. CALL _WriteCMD
  328. PAGESEL $
  329. ; .line 66; "main.c" CheckSum=0;
  330. CLRF r0x1023
  331. CLRF r0x1024
  332. ; .line 67; "main.c" for(j=0;j<16;j++)
  333. CLRF r0x1025
  334. _00120_DS_:
  335. ; .line 68; "main.c" CheckSum+=RF_RXBUF[j]; //add 0x30-----0x3F
  336. MOVF r0x1025,W
  337. ADDLW (_RF_RXBUF + 0)
  338. MOVWF r0x1026
  339. MOVLW high (_RF_RXBUF + 0)
  340. BTFSC STATUS,0
  341. ADDLW 0x01
  342. MOVWF r0x1027
  343. MOVF r0x1026,W
  344. MOVWF FSR
  345. BCF STATUS,7
  346. BTFSC r0x1027,0
  347. BSF STATUS,7
  348. MOVF INDF,W
  349. MOVWF r0x1028
  350. MOVWF r0x1026
  351. CLRF r0x1027
  352. ;;99 MOVF r0x1026,W
  353. MOVLW 0x00
  354. MOVWF r0x1029
  355. MOVF r0x1028,W
  356. ADDWF r0x1023,F
  357. MOVF r0x1029,W
  358. BTFSC STATUS,0
  359. INCFSZ r0x1029,W
  360. ADDWF r0x1024,F
  361. ; .line 67; "main.c" for(j=0;j<16;j++)
  362. INCF r0x1025,F
  363. ;;unsigned compare: left < lit(0x10=16), size=1
  364. MOVLW 0x10
  365. SUBWF r0x1025,W
  366. BTFSS STATUS,0
  367. GOTO _00120_DS_
  368. ;;genSkipc:3257: created from rifx:00000000047857B0
  369. ; .line 69; "main.c" CheckSum&=0x0FF;
  370. CLRF r0x1024
  371. ; .line 70; "main.c" if(CheckSum==RF_RXBUF[16])
  372. MOVF (_RF_RXBUF + 16),W
  373. MOVWF r0x1025
  374. MOVWF r0x1026
  375. CLRF r0x1027
  376. MOVF r0x1026,W
  377. XORWF r0x1023,W
  378. BTFSS STATUS,2
  379. GOTO _00001_DS_
  380. MOVF r0x1027,W
  381. ; .line 72; "main.c" LED=1;
  382. XORWF r0x1024,W
  383. ; .line 74; "main.c" Delayus(1);
  384. BTFSS STATUS,2
  385. GOTO _00001_DS_
  386. BANKSEL _PORTAbits
  387. BSF _PORTAbits,0
  388. _00001_DS_:
  389. MOVLW 0x01
  390. MOVWF STK00
  391. MOVLW 0x00
  392. PAGESEL _Delayus
  393. CALL _Delayus
  394. PAGESEL $
  395. ; .line 75; "main.c" LED=0;
  396. BANKSEL _PORTAbits
  397. BCF _PORTAbits,0
  398. GOTO _00114_DS_
  399. ; .line 79; "main.c" }
  400. RETURN
  401. ; exit point of _main
  402.  
  403. ;***
  404. ; pBlock Stats: dbName = C
  405. ;***
  406. ;has an exit
  407. ;functions called:
  408. ; _Delayus
  409. ; _Delayus
  410. ;3 compiler assigned registers:
  411. ; r0x1019
  412. ; r0x101A
  413. ; STK00
  414. ;; Starting pCode block
  415. S_main__Delays code
  416. _Delays:
  417. ; 2 exit points
  418. ; .line 190; "main.c" while(i--)
  419. MOVLW 0x0a
  420. MOVWF r0x1019
  421. _00165_DS_:
  422. MOVF r0x1019,W
  423. MOVWF r0x101A
  424. DECF r0x1019,F
  425. MOVF r0x101A,W
  426. BTFSC STATUS,2
  427. GOTO _00168_DS_
  428. ; .line 192; "main.c" Delayus(1);
  429. MOVLW 0x01
  430. MOVWF STK00
  431. MOVLW 0x00
  432. PAGESEL _Delayus
  433. CALL _Delayus
  434. PAGESEL $
  435. GOTO _00165_DS_
  436. _00168_DS_:
  437. ; .line 194; "main.c" }
  438. RETURN
  439. ; exit point of _Delays
  440.  
  441. ;***
  442. ; pBlock Stats: dbName = C
  443. ;***
  444. ;has an exit
  445. ;functions called:
  446. ; _NOP
  447. ; _NOP
  448. ;7 compiler assigned registers:
  449. ; r0x1013
  450. ; STK00
  451. ; r0x1014
  452. ; r0x1015
  453. ; r0x1016
  454. ; r0x1017
  455. ; r0x1018
  456. ;; Starting pCode block
  457. S_main__Delayus code
  458. _Delayus:
  459. ; 2 exit points
  460. ; .line 175; "main.c" void Delayus( uint us )
  461. MOVWF r0x1013
  462. MOVF STK00,W
  463. MOVWF r0x1014
  464. _00157_DS_:
  465. ; .line 178; "main.c" while( us-- )
  466. MOVF r0x1014,W
  467. MOVWF r0x1015
  468. MOVF r0x1013,W
  469. MOVWF r0x1016
  470. MOVLW 0xff
  471. ADDWF r0x1014,F
  472. BTFSS STATUS,0
  473. DECF r0x1013,F
  474. MOVF r0x1015,W
  475. IORWF r0x1016,W
  476. BTFSC STATUS,2
  477. GOTO _00160_DS_
  478. ; .line 181; "main.c" while( i-- )
  479. MOVLW 0xe8
  480. MOVWF r0x1015
  481. MOVLW 0x03
  482. MOVWF r0x1016
  483. _00154_DS_:
  484. MOVF r0x1015,W
  485. MOVWF r0x1017
  486. MOVF r0x1016,W
  487. MOVWF r0x1018
  488. MOVLW 0xff
  489. ADDWF r0x1015,F
  490. BTFSS STATUS,0
  491. DECF r0x1016,F
  492. MOVF r0x1017,W
  493. IORWF r0x1018,W
  494. BTFSC STATUS,2
  495. GOTO _00157_DS_
  496. ; .line 183; "main.c" NOP();
  497. PAGESEL _NOP
  498. CALL _NOP
  499. PAGESEL $
  500. GOTO _00154_DS_
  501. _00160_DS_:
  502. ; .line 186; "main.c" }
  503. RETURN
  504. ; exit point of _Delayus
  505.  
  506. ;***
  507. ; pBlock Stats: dbName = C
  508. ;***
  509. ;has an exit
  510. ;functions called:
  511. ; _NOP
  512. ; _NOP
  513. ; _NOP
  514. ; _NOP
  515. ; _NOP
  516. ; _NOP
  517. ; _NOP
  518. ; _NOP
  519. ; _NOP
  520. ; _NOP
  521. ; _NOP
  522. ; _NOP
  523. ; _NOP
  524. ; _NOP
  525. ; _NOP
  526. ; _NOP
  527. ;3 compiler assigned registers:
  528. ; r0x101B
  529. ; r0x101C
  530. ; r0x101D
  531. ;; Starting pCode block
  532. S_main__RF01_RDFIFO code
  533. _RF01_RDFIFO:
  534. ; 2 exit points
  535. ; .line 145; "main.c" SCK=0;
  536. BANKSEL _PORTBbits
  537. BCF _PORTBbits,4
  538. ; .line 146; "main.c" SDI=0;
  539. BCF _PORTBbits,5
  540. ; .line 147; "main.c" nSEL=0;
  541. BCF _PORTBbits,7
  542. ; .line 148; "main.c" for(i=0;i<16;i++)
  543. CLRF r0x101B
  544. _00147_DS_:
  545. ; .line 150; "main.c" SCK=1;
  546. BANKSEL _PORTBbits
  547. BSF _PORTBbits,4
  548. ; .line 151; "main.c" NOP();
  549. PAGESEL _NOP
  550. CALL _NOP
  551. PAGESEL $
  552. ; .line 152; "main.c" NOP();
  553. PAGESEL _NOP
  554. CALL _NOP
  555. PAGESEL $
  556. ; .line 153; "main.c" SCK=0;
  557. BANKSEL _PORTBbits
  558. BCF _PORTBbits,4
  559. ; .line 154; "main.c" NOP();
  560. PAGESEL _NOP
  561. CALL _NOP
  562. PAGESEL $
  563. ; .line 155; "main.c" NOP();
  564. PAGESEL _NOP
  565. CALL _NOP
  566. PAGESEL $
  567. ; .line 148; "main.c" for(i=0;i<16;i++)
  568. INCF r0x101B,F
  569. ;;unsigned compare: left < lit(0x10=16), size=1
  570. MOVLW 0x10
  571. SUBWF r0x101B,W
  572. BTFSS STATUS,0
  573. GOTO _00147_DS_
  574. ;;genSkipc:3257: created from rifx:00000000047857B0
  575. ; .line 157; "main.c" Result=0;
  576. CLRF r0x101B
  577. ; .line 158; "main.c" for(i=0;i<8;i++)
  578. CLRF r0x101C
  579. _00149_DS_:
  580. ; .line 160; "main.c" Result=Result<<1;
  581. MOVF r0x101B,W
  582. MOVWF r0x101D
  583. BCF STATUS,0
  584. RLF r0x101D,W
  585. ; .line 161; "main.c" if(SDO)
  586. MOVWF r0x101B
  587. ; .line 163; "main.c" Result|=1;
  588. BANKSEL _PORTBbits
  589. BTFSC _PORTBbits,2
  590. ; .line 165; "main.c" SCK=1;
  591. BSF r0x101B,0
  592. BSF _PORTBbits,4
  593. ; .line 166; "main.c" NOP();
  594. PAGESEL _NOP
  595. CALL _NOP
  596. PAGESEL $
  597. ; .line 167; "main.c" NOP();
  598. PAGESEL _NOP
  599. CALL _NOP
  600. PAGESEL $
  601. ; .line 168; "main.c" SCK=0;
  602. BANKSEL _PORTBbits
  603. BCF _PORTBbits,4
  604. ; .line 169; "main.c" NOP();
  605. PAGESEL _NOP
  606. CALL _NOP
  607. PAGESEL $
  608. ; .line 170; "main.c" NOP();
  609. PAGESEL _NOP
  610. CALL _NOP
  611. PAGESEL $
  612. ; .line 158; "main.c" for(i=0;i<8;i++)
  613. INCF r0x101C,F
  614. ;;unsigned compare: left < lit(0x8=8), size=1
  615. MOVLW 0x08
  616. SUBWF r0x101C,W
  617. BTFSS STATUS,0
  618. GOTO _00149_DS_
  619. ;;genSkipc:3257: created from rifx:00000000047857B0
  620. ; .line 172; "main.c" nSEL=1;
  621. BANKSEL _PORTBbits
  622. BSF _PORTBbits,7
  623. ; .line 173; "main.c" return(Result);
  624. MOVF r0x101B,W
  625. ; .line 174; "main.c" }
  626. RETURN
  627. ; exit point of _RF01_RDFIFO
  628.  
  629. ;***
  630. ; pBlock Stats: dbName = C
  631. ;***
  632. ;has an exit
  633. ;functions called:
  634. ; _Write1
  635. ; _Write0
  636. ; _Write1
  637. ; _Write0
  638. ;5 compiler assigned registers:
  639. ; r0x101E
  640. ; STK00
  641. ; r0x101F
  642. ; r0x1020
  643. ; r0x1021
  644. ;; Starting pCode block
  645. S_main__WriteCMD code
  646. _WriteCMD:
  647. ; 2 exit points
  648. ; .line 126; "main.c" void WriteCMD( uint CMD )
  649. MOVWF r0x101E
  650. MOVF STK00,W
  651. MOVWF r0x101F
  652. ; .line 129; "main.c" SCK=0;
  653. BANKSEL _PORTBbits
  654. BCF _PORTBbits,4
  655. ; .line 130; "main.c" nSEL=0;
  656. BCF _PORTBbits,7
  657. ; .line 131; "main.c" while(n--)
  658. MOVLW 0x10
  659. MOVWF r0x1020
  660. _00136_DS_:
  661. MOVF r0x1020,W
  662. MOVWF r0x1021
  663. DECF r0x1020,F
  664. MOVF r0x1021,W
  665. BTFSC STATUS,2
  666. GOTO _00138_DS_
  667. ; .line 133; "main.c" if(CMD&0x8000)
  668. BTFSS r0x101E,7
  669. GOTO _00134_DS_
  670. ; .line 134; "main.c" Write1();
  671. PAGESEL _Write1
  672. CALL _Write1
  673. PAGESEL $
  674. GOTO _00135_DS_
  675. _00134_DS_:
  676. ; .line 136; "main.c" Write0();
  677. PAGESEL _Write0
  678. CALL _Write0
  679. PAGESEL $
  680. _00135_DS_:
  681. ; .line 137; "main.c" CMD=CMD<<1;
  682. BCF STATUS,0
  683. RLF r0x101F,F
  684. RLF r0x101E,F
  685. GOTO _00136_DS_
  686. _00138_DS_:
  687. ; .line 139; "main.c" SCK=0;
  688. BANKSEL _PORTBbits
  689. BCF _PORTBbits,4
  690. ; .line 140; "main.c" nSEL=1;
  691. BSF _PORTBbits,7
  692. ; .line 141; "main.c" }
  693. RETURN
  694. ; exit point of _WriteCMD
  695.  
  696. ;***
  697. ; pBlock Stats: dbName = C
  698. ;***
  699. ;has an exit
  700. ;functions called:
  701. ; _NOP
  702. ; _NOP
  703. ; _NOP
  704. ; _NOP
  705. ; _NOP
  706. ; _NOP
  707. ; _NOP
  708. ; _NOP
  709. ; _NOP
  710. ; _NOP
  711. ; _NOP
  712. ; _NOP
  713. ; _NOP
  714. ; _NOP
  715. ; _NOP
  716. ; _NOP
  717. ; _NOP
  718. ; _NOP
  719. ; _NOP
  720. ; _NOP
  721. ; _NOP
  722. ; _NOP
  723. ; _NOP
  724. ; _NOP
  725. ; _NOP
  726. ; _NOP
  727. ; _NOP
  728. ; _NOP
  729. ; _NOP
  730. ; _NOP
  731. ; _NOP
  732. ; _NOP
  733. ; _NOP
  734. ; _NOP
  735. ;; Starting pCode block
  736. S_main__Write1 code
  737. _Write1:
  738. ; 2 exit points
  739. ; .line 105; "main.c" SDI=1;
  740. BANKSEL _PORTBbits
  741. BSF _PORTBbits,5
  742. ; .line 106; "main.c" SCK=0;
  743. BCF _PORTBbits,4
  744. ; .line 107; "main.c" NOP();
  745. PAGESEL _NOP
  746. CALL _NOP
  747. PAGESEL $
  748. ; .line 108; "main.c" NOP();
  749. PAGESEL _NOP
  750. CALL _NOP
  751. PAGESEL $
  752. ; .line 109; "main.c" NOP();
  753. PAGESEL _NOP
  754. CALL _NOP
  755. PAGESEL $
  756. ; .line 110; "main.c" NOP();
  757. PAGESEL _NOP
  758. CALL _NOP
  759. PAGESEL $
  760. ; .line 111; "main.c" NOP();
  761. PAGESEL _NOP
  762. CALL _NOP
  763. PAGESEL $
  764. ; .line 112; "main.c" NOP();
  765. PAGESEL _NOP
  766. CALL _NOP
  767. PAGESEL $
  768. ; .line 113; "main.c" NOP();
  769. PAGESEL _NOP
  770. CALL _NOP
  771. PAGESEL $
  772. ; .line 114; "main.c" NOP();
  773. PAGESEL _NOP
  774. CALL _NOP
  775. PAGESEL $
  776. ; .line 115; "main.c" NOP();
  777. PAGESEL _NOP
  778. CALL _NOP
  779. PAGESEL $
  780. ; .line 116; "main.c" NOP();
  781. PAGESEL _NOP
  782. CALL _NOP
  783. PAGESEL $
  784. ; .line 117; "main.c" NOP();
  785. PAGESEL _NOP
  786. CALL _NOP
  787. PAGESEL $
  788. ; .line 118; "main.c" NOP();
  789. PAGESEL _NOP
  790. CALL _NOP
  791. PAGESEL $
  792. ; .line 119; "main.c" NOP();
  793. PAGESEL _NOP
  794. CALL _NOP
  795. PAGESEL $
  796. ; .line 120; "main.c" NOP();
  797. PAGESEL _NOP
  798. CALL _NOP
  799. PAGESEL $
  800. ; .line 121; "main.c" NOP();
  801. PAGESEL _NOP
  802. CALL _NOP
  803. PAGESEL $
  804. ; .line 122; "main.c" NOP();
  805. PAGESEL _NOP
  806. CALL _NOP
  807. PAGESEL $
  808. ; .line 123; "main.c" SCK=1;
  809. BANKSEL _PORTBbits
  810. BSF _PORTBbits,4
  811. ; .line 124; "main.c" NOP();
  812. PAGESEL _NOP
  813. CALL _NOP
  814. PAGESEL $
  815. ; .line 125; "main.c" }
  816. RETURN
  817. ; exit point of _Write1
  818.  
  819. ;***
  820. ; pBlock Stats: dbName = C
  821. ;***
  822. ;has an exit
  823. ;functions called:
  824. ; _NOP
  825. ; _NOP
  826. ; _NOP
  827. ; _NOP
  828. ; _NOP
  829. ; _NOP
  830. ; _NOP
  831. ; _NOP
  832. ; _NOP
  833. ; _NOP
  834. ; _NOP
  835. ; _NOP
  836. ; _NOP
  837. ; _NOP
  838. ; _NOP
  839. ; _NOP
  840. ; _NOP
  841. ; _NOP
  842. ; _NOP
  843. ; _NOP
  844. ; _NOP
  845. ; _NOP
  846. ; _NOP
  847. ; _NOP
  848. ; _NOP
  849. ; _NOP
  850. ; _NOP
  851. ; _NOP
  852. ; _NOP
  853. ; _NOP
  854. ; _NOP
  855. ; _NOP
  856. ; _NOP
  857. ; _NOP
  858. ;; Starting pCode block
  859. S_main__Write0 code
  860. _Write0:
  861. ; 2 exit points
  862. ; .line 82; "main.c" SDI=0;
  863. BANKSEL _PORTBbits
  864. BCF _PORTBbits,5
  865. ; .line 83; "main.c" SCK=0;
  866. BCF _PORTBbits,4
  867. ; .line 84; "main.c" NOP();
  868. PAGESEL _NOP
  869. CALL _NOP
  870. PAGESEL $
  871. ; .line 85; "main.c" NOP();
  872. PAGESEL _NOP
  873. CALL _NOP
  874. PAGESEL $
  875. ; .line 86; "main.c" NOP();
  876. PAGESEL _NOP
  877. CALL _NOP
  878. PAGESEL $
  879. ; .line 87; "main.c" NOP();
  880. PAGESEL _NOP
  881. CALL _NOP
  882. PAGESEL $
  883. ; .line 88; "main.c" NOP();
  884. PAGESEL _NOP
  885. CALL _NOP
  886. PAGESEL $
  887. ; .line 89; "main.c" NOP();
  888. PAGESEL _NOP
  889. CALL _NOP
  890. PAGESEL $
  891. ; .line 90; "main.c" NOP();
  892. PAGESEL _NOP
  893. CALL _NOP
  894. PAGESEL $
  895. ; .line 91; "main.c" NOP();
  896. PAGESEL _NOP
  897. CALL _NOP
  898. PAGESEL $
  899. ; .line 92; "main.c" NOP();
  900. PAGESEL _NOP
  901. CALL _NOP
  902. PAGESEL $
  903. ; .line 93; "main.c" NOP();
  904. PAGESEL _NOP
  905. CALL _NOP
  906. PAGESEL $
  907. ; .line 94; "main.c" NOP();
  908. PAGESEL _NOP
  909. CALL _NOP
  910. PAGESEL $
  911. ; .line 95; "main.c" NOP();
  912. PAGESEL _NOP
  913. CALL _NOP
  914. PAGESEL $
  915. ; .line 96; "main.c" NOP();
  916. PAGESEL _NOP
  917. CALL _NOP
  918. PAGESEL $
  919. ; .line 97; "main.c" NOP();
  920. PAGESEL _NOP
  921. CALL _NOP
  922. PAGESEL $
  923. ; .line 98; "main.c" NOP();
  924. PAGESEL _NOP
  925. CALL _NOP
  926. PAGESEL $
  927. ; .line 99; "main.c" NOP();
  928. PAGESEL _NOP
  929. CALL _NOP
  930. PAGESEL $
  931. ; .line 100; "main.c" SCK=1;
  932. BANKSEL _PORTBbits
  933. BSF _PORTBbits,4
  934. ; .line 101; "main.c" NOP();
  935. PAGESEL _NOP
  936. CALL _NOP
  937. PAGESEL $
  938. ; .line 102; "main.c" }
  939. RETURN
  940. ; exit point of _Write0
  941.  
  942. ;***
  943. ; pBlock Stats: dbName = C
  944. ;***
  945. ;has an exit
  946. ;; Starting pCode block
  947. S_main__RF1_Init code
  948. _RF1_Init:
  949. ; 2 exit points
  950. ; .line 28; "main.c" nSEL=1;
  951. BANKSEL _PORTBbits
  952. BSF _PORTBbits,7
  953. ; .line 29; "main.c" SDI=1;
  954. BSF _PORTBbits,5
  955. ; .line 30; "main.c" SCK=0;
  956. BCF _PORTBbits,4
  957. ; .line 31; "main.c" nSEL_OUT();
  958. BANKSEL _TRISBbits
  959. BCF _TRISBbits,7
  960. ; .line 32; "main.c" SDI_OUT();
  961. BCF _TRISBbits,5
  962. ; .line 33; "main.c" SDO_IN();
  963. BSF _TRISBbits,2
  964. ; .line 34; "main.c" nIRQ_IN();
  965. BSF _TRISBbits,1
  966. ; .line 35; "main.c" SCK_OUT();
  967. BCF _TRISBbits,4
  968. ; .line 36; "main.c" LED_OUT();
  969. BCF _TRISAbits,0
  970. ; .line 37; "main.c" LED=0;
  971. BANKSEL _PORTAbits
  972. BCF _PORTAbits,0
  973. ; .line 38; "main.c" }
  974. RETURN
  975. ; exit point of _RF1_Init
  976.  
  977.  
  978. ; code size estimation:
  979. ; 298+ 144 = 442 instructions ( 1172 byte)
  980.  
  981. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement