Package: sdcc
Severity: wishlist

in pic14 and pic16 (actually i need pic14 - 16f877)
i would like to see support for the "dt" instruction.

"dt" is an extremely commonly used technique for accessing
arrays:

        movlw   HIGH ARRAY
        movwf pclath; /* loads top bits of ARRAY into pclath */
        movf    index,w;
        call ARRAY;
        movwf  destination;
        mov


        ARRAY:
                addwf   pcl, f; /* adds program counter to f(!) */
                dt "0123456789abcdef",0; /* returns data pointed to by pctr! */

two key things are required to pull this off:

1) support for "HIGH" qualifier in pic14 peephole instruction 
   analysis

2) support for dt instructions.

this is a _standard_ technique for accessing static arrays
that is well-documented, and several examples, including pdf
presentations, can be found easily by searching for "pic dt
p16f877" on google.com.

mpasm has this behaviour automatically as part of its optimisation.


-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux highfield 2.6.10-1-686 #1 Tue Jan 18 04:34:19 EST 2005 i686
Locale: LANG=C, LC_CTYPE=C



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to