Compiling and code oddities


Results 1 to 11 of 11

Threaded View

  1. #1
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190

    Default Compiling and code oddities

    I'm having trouble with a code error during compile of a test program I'm writing. Although I can't see what's wrong with the SHIFTOUT line, the PBP compiler says it excpected a ] when as far as I can see it's all there.

    I also have two pieces of counting code. One 'up' count is not incrementing at 99 but zeroing, the other 'down' code works ok but it's virtually the same code.

    Also, If I add any type of config lines then the compiler complains that it's 'Overwriting previous address contents'

    Code:
    shiftout 2,3,0,[ 07,2B,02,0C ]
    
    up:
    
      counter[0]=counter[0]+1
    if counter[0]>99 then 
        counter[0]=0
         counter[1]=counter[1]+1
         if counter[1]>99 then
           counter[1]=0
            counter[2]=counter[2]+1
             if counter[2]>99 then
              counter[2]=0
               counter[3]=counter[3]+1
                if counter[3]>99 then
                 counter[3]=0     ;reset to zero
             endif
           endif
        endif 
     endif 
    return
    
    down:
    
      counter[0]=counter[0]-1
    if counter[0]<1 then 
        counter[0]=0
         counter[1]=counter[1]-1
         if counter[1]<1 then
          counter[1]=99
            counter[2]=counter[2]-1
             if counter[2]<1 then
              counter[2]=99
               counter[3]=counter[3]-1
                if counter[3]<1 then
                 counter[3]=99
             endif
           endif
        endif 
     endif 
    return
    Last edited by tasmod; - 12th November 2012 at 16:38.

Similar Threads

  1. Problem compiling EasyHID code
    By mindthomas in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 25th August 2010, 20:46
  2. compiling 12f675
    By MOUNTAIN747 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 13th November 2009, 01:22
  3. Replies: 14
    Last Post: - 31st March 2009, 12:04
  4. Replies: 1
    Last Post: - 21st February 2008, 15:36
  5. I need HELP with compiling!!!!!!
    By kenny_m in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 15th February 2008, 20:34

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