PBP Using too many instructions


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Ive been trying to get my head round this ASM code. Mike's ASM seems to do almost exactly what i want but i just want to clarify things as im completely new to ASM.

    Is W some kind of temp byte? It appears that ASM compare commands only accept 1 input and that is always compared with W.

    Ive read the part in the datasheet about CPFSGT. It says "Compare f with W, skip if f > W". I assume this means skip the following line of code

    BCF looks pretty obvious. What is "Shadow" though? Is that a predefined variable of some kind or does it need declaring anywhere?

  2. #2
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    966


    Did you find this post helpful? Yes | No

    Default

    Is W some kind of temp byte? It appears that ASM compare commands only accept 1 input and that is always compared with W.
    Yes, W is the Accumulator on which almost all operations are performed.

    What is "Shadow" though? Is that a predefined variable of some kind or does it need declaring anywhere?
    Yes, shadow is a byte sized variable which holds a copy of the actual bits which turn on/off the leds attached to PORTB. It has to be declared like this

    Code:
    shadow:  var byte

  3. #3
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    So "LATB" is the ASM version of PORTB?

    Is Shadow just a normal variable then? So i could call it LATBTemp if i wanted?

    Is there a reason i would use Shadow instead of performing the operations directly on LATB?

Similar Threads

  1. PBP Book
    By Bruce in forum Off Topic
    Replies: 83
    Last Post: - 4th October 2021, 12:55
  2. PBP, ASM and LST files
    By HenrikOlsson in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th January 2010, 13:43
  3. List of instructions used in PBP ?
    By AndrewC in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 2nd November 2007, 11:22
  4. Compiler differences between PBP 2.33 & 2.46
    By nikopolis in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd May 2006, 19:01
  5. Newby- PBP wont compile for 18F (MPLAB)
    By jd76duke in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th December 2005, 23:30

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