Searching \ for 'Multiple retlw' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=multiple+retlw
Search entire site for: 'Multiple retlw'.

Truncated match.
PICList Thread
'Multiple retlw'
1997\02\12@235618 by ONY NIXON 54964

flavicon
face
I was wondering if there is a short way of creating a list of
RETLW instructions instead of typing them all out using MPASM.

eg
Table retlw 0h
         retlw 1h
         retlw 2h
         ...
         retlw 64h

to perhaps..

Table   Retlw 0,1,2,3,4 etc

Regards
Tony


Just when I thought I knew it all,
I learned that I didn't.

1997\02\13@011623 by Bob Blick

flavicon
face
At 11:58 AM 2/13/97 -1000, you wrote:
>I was wondering if there is a short way of creating a list of
>RETLW instructions instead of typing them all out using MPASM.
>eg
>Table retlw 0h
>          retlw 1h
>          retlw 2h
>          ...
>          retlw 64h
>to perhaps..
>
>Table   Retlw 0,1,2,3,4 etc

Yep, you can do it like this:

dt      1,2,3,4,5
dt      6,7,8,9,10
is the same as:

retlw   1
retlw 2
retlw 3
retlw 4
retlw 5
retlw 6
retlw 7
retlw 8
retlw 9
retlw 10

you can put as many on a line as you like. I think "dt" stands for "data
table" or something.

-Bob

1997\02\13@013542 by Andrew Warren

face
flavicon
face
TONY NIXON 54964 <spam_OUTPICLISTTakeThisOuTspamMITVMA.MIT.EDU> wrote:

> I was wondering if there is a short way of creating a list of
> RETLW instructions instead of typing them all out using MPASM.
>
> eg
> Table retlw 0h
>       retlw 1h
>       retlw 2h
>       ...
>       retlw 64h
>
> to perhaps..
>
> Table Retlw 0,1,2,3,4 etc

Tony:

From the answer to Question #6, in the "Microchip PIC" section of
the "Answers" page on my company's web site:

   Use the DT directive.

        DT "Test",0

   will assemble to:

        RETLW "T"
        RETLW "e"
        RETLW "s"
        RETLW "t"
        RETLW 0

In your case, you'd do the following:

   DT 1,2,3,4

-Andy

=== Andrew Warren - .....fastfwdKILLspamspam@spam@ix.netcom.com                 ===
=== Fast Forward Engineering - Vista, California          ===
===                                                       ===
=== Did the information in this post help you?  Consider  ===
=== contributing to the PICLIST Fund.  Details are at:    ===
=== http://www.geocities.com/SiliconValley/2499/fund.html ===

1997\02\13@182140 by Tony Matthews

flavicon
face
TONY NIXON 54964 wrote:
>
> I was wondering if there is a short way of creating a list of
> RETLW instructions instead of typing them all out using MPASM.
>
> eg
> Table retlw 0h
>           retlw 1h
>           retlw 2h
>           ...
>           retlw 64h
>
> to perhaps..
>
> Table   Retlw 0,1,2,3,4 etc
>
> Regards
> Tony
>
> Just when I thought I knew it all,
> I learned that I didn't.
TABLE
               MOVF    OFFSET,W        ; put offset value in w register
               ADDWF   PCL,F           ; add offset to pc to generate a compute
d goto
               NOP
               DT      "TonyMatthews"
               DT      "Envirosave  (910)392-8009"
               DT      "Photographic Waste Treatment Systems"
               DT      "Gallons   PUMP ON  PUMP OFFPumpRateEXIT?TubeSize"
               DT      "PROGRAMMODEE"
This is what I did last it works fine
Tony M.

More... (looser matching)
- Last day of these posts
- In 1997 , 1998 only
- Today
- New search...