Code in PBPPI18L.LIB, can I ?


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Re: Code in PBPPI18L.LIB, can I ?

    forget misinterpreted last post,
    not sure if you saw,
    In second post I had added the check for 16 bit =0,at top of routine, few lines asm for that
    Code:
     LIST
    ARRAYREADTO movf R6, F                       ; Check for no chars left in array    hi & low R6
                         bcf STATUS, C                   ; Preset for timed out (C clear)   
                         btfsc STATUS, Z          ; Set "Z" if LOW "Reg" == 0
                         movf  R6+1, F    
                         bz    arrayreaddone               ; No chars left
                         movf   R6, F                   
                btfsc  STATUS, Z      ;decrement high and low
               decf  R6+1, F         ;If Low byte is Zero, Decrement High
                          decf    R6, F                          ; Count down the characters left and fall through to ARRAYREAD  
    
    NOLISTARRAYREAD_USED = 1    
    endif
    hard to format text in code window.

    Don
    Last edited by amgen; - 28th September 2011 at 20:52.

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: Code in PBPPI18L.LIB, can I ?

    OK, and you can forget my misinterpreted last post too.
    After further testing, your changes do work as advertised. My test was flawed.

    Back to the redundant code question, I think you can save 1 WORD by changing the second part to ...
    Code:
    ;        movf   R6, F
            decf    R6, F          ; Count down the characters left and fall through to ARRAYREAD  
            btfss  STATUS, C       ; If Low byte borrowed
            decf  R6+1, F          ; Decrement High
    It's not much, but ...
    Last edited by Darrel Taylor; - 29th September 2011 at 01:37.
    DT

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: Code in PBPPI18L.LIB, can I ?

    Don,

    Would you like melabs to include your changes in the next update to PBP3?
    DT

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: Code in PBPPI18L.LIB, can I ?

    By all means,
    I would feel honored.

    Don

  5. #5
    Join Date
    Mar 2005
    Location
    CROATIA
    Posts
    38


    Did you find this post helpful? Yes | No

    Default Re: Code in PBPPI18L.LIB, can I ?

    Hi, I just seen this post, but i already post my problem regarding array.0(word-sized-variable)
    as this isue is similar for reading, can someone give me hint how can we patch writing routine
    to have array.0(word-sized-variable) working, as now only byte size index works....

    regards, & thenx for any kind oh help

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