gplink-1.5.0 #1285 (Nov 6 2016) Copyright (c) 1998-2016 gputils project Listing File Generated: 11/07/2016 03:13:40 AM Address Value Disassembly Source ------- ----- ----------- ------ ;-------------------------------------------------------- ; File Created by SDCC : free open source ANSI-C Compiler ; Version 3.6.0 #9615 (Linux) ;-------------------------------------------------------- ; PIC port for the 14-bit core ;-------------------------------------------------------- ; .file "opt01.c" list p=16f1718 radix dec include "p16f1718.inc" LIST ;========================================================================== ; Build date : Aug 13 2015 ; MPASM PIC16F1718 processor include ; ; (c) Copyright 1999-2015 Microchip Technology, All rights reserved ;========================================================================== NOLIST ;-------------------------------------------------------- ; external declarations ;-------------------------------------------------------- extern _LATA extern _LATB extern _LATC extern __gptrget2 extern __sdcc_gsinit_startup ;-------------------------------------------------------- ; global declarations ;-------------------------------------------------------- global _main global PSAVE global SSAVE global WSAVE global STK12 global STK11 global STK10 global STK09 global STK08 global STK07 global STK06 global STK05 global STK04 global STK03 global STK02 global STK01 global STK00 sharebank udata_ovr 0x0070 PSAVE res 1 SSAVE res 1 WSAVE res 1 STK12 res 1 STK11 res 1 STK10 res 1 STK09 res 1 STK08 res 1 STK07 res 1 STK06 res 1 STK05 res 1 STK04 res 1 STK03 res 1 STK02 res 1 STK01 res 1 STK00 res 1 ;-------------------------------------------------------- ; global definitions ;-------------------------------------------------------- ;-------------------------------------------------------- ; absolute symbol definitions ;-------------------------------------------------------- ;-------------------------------------------------------- ; compiler-defined variables ;-------------------------------------------------------- UDL_opt01_0 udata r0x1004 res 1 r0x1003 res 1 ;-------------------------------------------------------- ; initialized data ;-------------------------------------------------------- ID_opt01_0 idata _ptr db 0x00, 0x20 ID_opt01_1 idata _idx db 0xff ID_opt01_2 idata _cptr db 0x00, 0x20 ;-------------------------------------------------------- ; overlayable items in internal ram ;-------------------------------------------------------- ; udata_ovr ;-------------------------------------------------------- ; reset vector ;-------------------------------------------------------- STARTUP code 0x0000 000000 0000 nop nop 000001 3180 movlp 0x00 pagesel __sdcc_gsinit_startup 000002 2803 goto 0x0003 goto __sdcc_gsinit_startup ;-------------------------------------------------------- ; code ;-------------------------------------------------------- code_opt01 code ;*** ; pBlock Stats: dbName = M ;*** ;has an exit ;functions called: ; __gptrget2 ; __gptrget2 ;4 compiler assigned registers: ; STK01 ; STK00 ; r0x1003 ; r0x1004 ;; Starting pCode block S_opt01__main code _main: ; 2 exit points _00105_DS_: ; .line 34; "opt01.c" while (idx) { 000083 3000 movlw 0x00 MOVLW 0x00 000084 0039 movlb 0x19 BANKSEL _idx 000085 0432 iorwf 0x32, 0x0 IORWF _idx,W 000086 1903 btfsc 0x03, 0x2 BTFSC STATUS,2 000087 28bf goto 0x00bf GOTO _00108_DS_ ;;genAssign from CODESPACE ; .line 35; "opt01.c" LATA = cptr[idx]; 000088 30b0 movlw 0xb0 MOVLW low (_cptr+0) 000089 00fe movwf 0x7e MOVWF STK01 00008a 300c movlw 0x0c MOVLW high (_cptr+0) 00008b 00ff movwf 0x7f MOVWF STK00 00008c 3080 movlw 0x80 MOVLW 0x80 00008d 3180 movlp 0x00 PAGESEL __gptrget2 00008e 20c0 call 0x00c0 CALL __gptrget2 00008f 3180 movlp 0x00 PAGESEL $ 000090 0039 movlb 0x19 BANKSEL r0x1003 000091 00ad movwf 0x2d MOVWF r0x1003 000092 087f movf 0x7f, 0x0 MOVF STK00,W 000093 00ac movwf 0x2c MOVWF r0x1004 000094 0039 movlb 0x19 BANKSEL _idx 000095 0832 movf 0x32, 0x0 MOVF _idx,W 000096 0039 movlb 0x19 BANKSEL r0x1004 000097 07ac addwf 0x2c, 0x1 ADDWF r0x1004,F 000098 082d movf 0x2d, 0x0 MOVF r0x1003,W 000099 1803 btfsc 0x03, 0x0 BTFSC STATUS,0 00009a 3e01 addlw 0x01 ADDLW 0x01 00009b 00ad movwf 0x2d MOVWF r0x1003 00009c 082c movf 0x2c, 0x0 MOVF r0x1004,W 00009d 0084 movwf 0x04 MOVWF FSR0L 00009e 082d movf 0x2d, 0x0 MOVF r0x1003,W 00009f 0085 movwf 0x05 MOVWF FSR0H 0000a0 0800 movf 0x00, 0x0 MOVF INDF0,W 0000a1 0022 movlb 0x02 BANKSEL _LATA 0000a2 008c movwf 0x0c MOVWF _LATA ; .line 37; "opt01.c" LATB = ptr[idx]; 0000a3 0039 movlb 0x19 BANKSEL _idx 0000a4 0832 movf 0x32, 0x0 MOVF _idx,W 0000a5 0039 movlb 0x19 BANKSEL _ptr 0000a6 072e addwf 0x2e, 0x0 ADDWF _ptr,W 0000a7 0039 movlb 0x19 BANKSEL r0x1004 0000a8 00ac movwf 0x2c MOVWF r0x1004 0000a9 0039 movlb 0x19 BANKSEL _ptr 0000aa 082f movf 0x2f, 0x0 MOVF (_ptr + 1),W 0000ab 1803 btfsc 0x03, 0x0 BTFSC STATUS,0 0000ac 3e01 addlw 0x01 ADDLW 0x01 0000ad 0039 movlb 0x19 BANKSEL r0x1003 0000ae 00ad movwf 0x2d MOVWF r0x1003 0000af 082c movf 0x2c, 0x0 MOVF r0x1004,W 0000b0 0084 movwf 0x04 MOVWF FSR0L 0000b1 082d movf 0x2d, 0x0 MOVF r0x1003,W 0000b2 0085 movwf 0x05 MOVWF FSR0H 0000b3 0800 movf 0x00, 0x0 MOVF INDF0,W 0000b4 0022 movlb 0x02 BANKSEL _LATB 0000b5 008d movwf 0x0d MOVWF _LATB ; inline asm version 0000b6 0039 movlb 0x19 BANKSEL _idx 0000b7 0832 movf 0x32, 0x0 MOVF _idx,W 0000b8 0084 movwf 0x04 MOVWF FSR0L 0000b9 3020 movlw 0x20 MOVLW high(0x2000) 0000ba 0085 movwf 0x05 MOVWF FSR0H 0000bb 0800 movf 0x00, 0x0 MOVF INDF0,W 0000bc 0022 movlb 0x02 BANKSEL LATC 0000bd 008e movwf 0x0e MOVWF LATC 0000be 2883 goto 0x0083 GOTO _00105_DS_ _00108_DS_: 0000bf 0008 return RETURN ; exit point of _main ; code size estimation: ; 40+ 13 = 53 instructions ( 132 byte) end LIST ;========================================================================== ; Build date : Aug 13 2015 ; MPASM PIC16F1934 processor include ; ; (c) Copyright 1999-2015 Microchip Technology, All rights reserved ;========================================================================== NOLIST LIST ;========================================================================== ; Build date : Aug 13 2015 ; MPASM PIC16F1718 processor include ; ; (c) Copyright 1999-2015 Microchip Technology, All rights reserved ;========================================================================== NOLIST