Embedded Strings in your Code Space


Closed Thread
Results 1 to 40 of 50

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    I guess the move went well, it seems to still be notifying us, and replies are going to the new thread. That's the first time I've split a thread, so I wasn't sure.

    Back to the topic, this isn't quite what I had thought of earlier, but the code changed since then. I haven't had a chance to try it yet, but it does compile.

    So assuming everything is working, I wanted to add one thing that gets you closer to that 1 line "embedded message strings" that you're looking for.

    Here's a simple macro that should do the same thing that you have now, but only takes 1 line (of PBP code) to do it. It needs to be before Main:
    Code:
    ASM
    SendStr  macro Astring
        call _prntSTR
        data Astring,0
        endm
    ENDASM
    Now in the "Main" code, it'll look like this...
    Code:
    Main:
       CALL USART_Init
    
    @ SendStr "This is a string" 
    @ SendStr "yet another string again"
    @ SendStr "and one more time!"
    OR, of course it could also be...
    Code:
    ASM
      SendStr "This is a string" 
      SendStr "yet another string again"
      SendStr "and one more time!"
    ENDASM
    Darrel
    Last edited by Darrel Taylor; - 1st July 2005 at 06:29.

Similar Threads

  1. Minimizing code space
    By Tobias in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th May 2009, 07:25
  2. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 21:31
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  5. Please help with storing strings in codespace
    By g-hoot in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th May 2008, 01:02

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts