Arraywrite Maxlength modification


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2009
    Posts
    755

    Default Arraywrite Maxlength modification

    From manual:
    Maxlength must be less than 256
    But I need limit array to 1000 bytes, so I decide to play with pbppi18l.lib

    Find
    Code:
    ARRAYWRITETO movf R6, F		; Check for no space left in array
    	bcf	STATUS, C	; Preset for timed out (C clear)
    	bz	arraywritedone	; No space left
    	decf	R6, F		; Count down the characters left
    	bra	ARRAYWRITE
    And replace with
    Code:
    ARRAYWRITETO movf R6, F ; Check for no space left in array
    	bcf     STATUS, C     ; Preset for timed out (C clear)
    	BTFSC   STATUS, Z
    	DECF	R6+1, F       
    	BTFSC   R6+1,7
    	bra     arraywritedone ; No space left
    	decf    R6, F          ; Count down the characters left
    	bra     ARRAYWRITE
    Now Maxlength can be up to 32767
    Probably need little more testing.
    Last edited by pedja089; - 4th March 2013 at 15:32.

  2. #2
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: Arraywrite Maxlength modification

    Also now you can use R6 system variable to determine array length:

    ArrayMaxLen con 1000
    TxBuffer var byte[ArrayMaxLen]
    ArrayLen var word
    Arraywrite TxBuffer, ArrayMaxLen, ArrayOverMax,[".........","etc"]
    ArrayLen = ArrayMaxLen - R6

Similar Threads

  1. ARRAYWRITE lenght
    By pedja089 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 16th June 2012, 15:45
  2. Question about ARRAYWRITE
    By circuitpro in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 30th July 2010, 21:00
  3. ELAPSED.PBP modification question
    By Tobias in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 25th December 2009, 00:35
  4. i need modification for this code as fast as possible
    By cool_guy4ever15 in forum Off Topic
    Replies: 8
    Last Post: - 30th June 2009, 01:09
  5. Bootloader Hardware Modification
    By NavMicroSystems in forum Schematics
    Replies: 1
    Last Post: - 5th August 2004, 00:46

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