STR \ Coun max len?


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2009
    Posts
    737

    Default STR \ Coun max len?

    Hi,
    Is there way to make count for STR to be larger than 1 byte. As far as I can see in pbppic18.lib it uses only one byte for countdown. I can make 2 byte counter, but I can't find where is stored high byte of count.
    I need to receive 700 bytes in array...
    I'll try to solve it with FOR/NEXT...

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,597


    Did you find this post helpful? Yes | No

    Default Re: STR \ Coun max len?

    Could you receive two blocks of 256 bytes and then one block of 188 bytes?

    Robert
    Last edited by Demon; - 8th December 2013 at 01:57.

  3. #3
    Join Date
    Sep 2009
    Posts
    737


    Did you find this post helpful? Yes | No

    Default Re: STR \ Coun max len?

    No.
    Because I need one continues string. It work with FOR...
    Compiler passes only low byte of count to R4.Byte1(system var). It would be nice to have some warning when compiler do that.
    So it isn't just some change in lib files, it would require changes to compiler. Probably isn't worth doing that...
    But when using 18F parts that have over 3K of RAM, and compiler all ready support arrays longer 255 byte, it would be nice to use STR same way for all arrays, independent of their size...

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


    Did you find this post helpful? Yes | No

    Default

    Receive 700 bytes into a single array using STR.
    Code:
    MyArray   VAR BYTE[700]
    
    HSERIN [WAIT("!"), STR MyArray\200, STR MyArray(200)\200, _
                       STR MyArray(400)\200, STR MyArray(600)\100]
    DT

  5. #5
    Join Date
    Sep 2009
    Posts
    737


    Did you find this post helpful? Yes | No

    Default Re: STR \ Coun max len?

    Thanks, Darrel.

Similar Threads

  1. STR ArrayVar question
    By MikeRant in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 26th May 2011, 22:01
  2. HSERIN and STR - character encoding
    By boban in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 13th August 2008, 17:36
  3. Help with STR ArrayVar\n\c with SerIn2
    By leinske in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 15th May 2006, 01:04
  4. Serin2 and STR Modifier
    By _Ian in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 22nd June 2005, 16:25
  5. STR function blues...
    By bearpawz in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 30th October 2004, 02:10

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