some help with math


Results 1 to 40 of 65

Threaded View

  1. #5
    Join Date
    May 2013
    Location
    australia
    Posts
    2,653


    Did you find this post helpful? Yes | No

    Default Re: some help with math

    I will see if I can explain it

    pic18 pgm mem is stored as words , so if the bytes are not an even number the last byte is padded with 00


    if we store this @ db "say",34,"hello",34,0

    then its stored like this lst file extract

    00014A 6173 2279 6568 db "say",34,"hello",34,0 ; note order looks reversed but its really lowbyte first
    6C6C 226F 0000

    when readcode reads it back

    its lowbyte, highbyte

    so the string is returned in order as say"hello",0
    Last edited by richard; - 16th September 2015 at 06:40.

Similar Threads

  1. Help with A/D math!
    By dbodenheimer in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 19th March 2011, 00:51
  2. Math help please...
    By Ioannis in forum General
    Replies: 2
    Last Post: - 20th June 2008, 10:18
  3. PBPL Math...new math takes more cycles...Always?
    By skimask in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 10th February 2008, 10:22
  4. Math help please!!!
    By jbirnsch in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 10th August 2007, 14:45
  5. math help
    By houa in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 30th January 2006, 16:58

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