copy-string 'function'


Results 1 to 28 of 28

Threaded View

  1. #8
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    You didn't get it from mister-e
    Well, then edit my 1st post to properly credit the original author. (You, Bruce, I don't remember where I first saw it, but I don't think it was in the optimization thread. I think it goes farther back than that to a thread about sending arrays out using SEROUT or something along those lines)

    What if the person doesn't want a 255 byte string? Maybe they only need 32. Your routine will wipe out other variables well beyond the array.
    It shouldn't wipe out anything the array is declared at 255 bytes (except that the stringpos would probably need to be defined as a word rather than a byte). If they only want 32, and they're advanced enough to be messing around with macro's, then I would think that a thinking person, which is becoming a rarity these days, would be able to figure out how to shorten the string to X number bytes.

    What if they have more than 1 array? It only copies to an array called string.
    Again, a thinking person should be able to figure out how to copy 'string' to another array the old fashioned way.

    What if they're using a 16F?
    Maybe they should think about moving over (not necessarily UP) to an 18F.

    Why do they have to manually change MOVE?CW to MOVE?CN.
    The macro only has to be changed once depending on the PIC's total memory. CW works up to 64K, CN works below 64K. Why not just leave it as CN all the time? CN takes more space.

    Why not detect when PBPL is used,
    The person compiling the program should be able to figure out quick enough if they use a LONG (i.e. the addr variable) that they need to use PBPL (they'll get an error otherwise). Says right in the manual that LONGs need PBPL. A person can type, a person must be able to RTFM.

    or have a separate macro for 32-bit addresses.
    Sure...let's complicate things just a bit more, make it a bit harder to remember which macro to use.

    Or better yet, do the tblrd's or EECON rd's manually, instead of relying on ReadCode. Then it's easy to handle over 64k or 16F's.
    The code works great for me. I don't remember stating that it was an 'All Inclusive' fix it for everybody. And ReadCode seems to work well above 64K with PBPL.

    Make it a true "PBP Extension".
    For me, it is an Extension...

    Move the thread over to 'Off Topic' or 'Bluetooth' or something.
    Last edited by skimask; - 15th August 2008 at 18:56.

Similar Threads

  1. How about String Variables?
    By mytekcontrols in forum PBP Wish List
    Replies: 40
    Last Post: - 20th January 2015, 12:53
  2. Replies: 11
    Last Post: - 12th July 2008, 02:36
  3. Embedded Strings in your Code Space
    By mytekcontrols in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 9th March 2008, 07:50
  4. Visual Basic 6 & Access 2000
    By Demon in forum Off Topic
    Replies: 33
    Last Post: - 7th September 2006, 04:39
  5. Message String Table using Readcode
    By mytekcontrols in forum Code Examples
    Replies: 2
    Last Post: - 10th July 2005, 23:17

Members who have read this thread : 0

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