Creating Checksum in PBP


Results 1 to 9 of 9

Threaded View

  1. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Deal with string is not as easy as in VB in PBP.

    2 way to deal with string. Store each character in a Array byte.
    Code:
    Myarray var byte[5]
    loop var byte
    
    Myarray[0]="h"
    Myarray[1]="e"
    Myarray[2]="l"
    Myarray[3]="l"
    Myarray[4]="o"
    
    for loop = 0 to 4
         hserout [Myarray[loop]]
    next
    here: goto here
    using the internal EEPROM
    Code:
    loop var byte
    EEPROMData var byte
    
    data @0,"hello"
    
    for loop = 0 to 4
         read loop, eepromdata
         hserout [eepromdata]
    next
    here: goto here
    there's also another way using DB in assembler but...
    Last edited by mister_e; - 1st March 2005 at 06:44.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. PBP Book
    By Bruce in forum Off Topic
    Replies: 83
    Last Post: - 4th October 2021, 13:55
  2. Checksum
    By retepsnikrep in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 24th October 2009, 05:09
  3. Calculate Byte Value Checksum in PBP Pro
    By Pedro Pinto in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 8th July 2009, 23:50
  4. Replies: 1
    Last Post: - 10th May 2006, 16:17
  5. Checksum problem!
    By atomski in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 3rd November 2004, 08:21

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