Two dimensional arrays?


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Nov 2008
    Posts
    48


    Did you find this post helpful? Yes | No

    Default

    Hi Darrel,
    great idea, i will test this.
    BTW:
    1. What is maximum size of an array (i use 18F6722)? I would need two array's
    with a width of 10 bytes and a length of max 256!
    2. The length of the array should be dynamically, means that after configuring
    the SW via RS232, the controller will be reseted and the array length will be redefined.
    But this is not possible in runtime, or? Only at compile-time !?
    Regards,
    Ralf

  2. #2
    Join Date
    Nov 2008
    Posts
    48


    Did you find this post helpful? Yes | No

    Default

    Silly question, i only have 3936 bytes in a 6722....

  3. #3
    Join Date
    Mar 2010
    Posts
    40


    Did you find this post helpful? Yes | No

    Default

    dear darrel,

    may i know the ASM part is for? is that if i using PBP language ni need the ASM part? and when i compile the it have error on "@ Put2D (X,Y)" "Illegal character (()"

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


    Did you find this post helpful? Yes | No

    Default

    Are you using MPASM for the assembler?

    It won't work with the default PM assembler.
    <br>
    DT

  5. #5
    Join Date
    Mar 2010
    Posts
    40


    Did you find this post helpful? Yes | No

    Default

    i using mplab and PICBASIC-PRO2.4.....and where i should i put the ASM file..

    ;----[Turn the Subroutines into Functions]----------------------------------
    ASM
    #Get2D macro X, Y
    MOVE?BB X, _Xidx ; copy users X value to Xidx
    MOVE?BB Y, _Yidx ; copy users Y value to Yidx
    L?CALL _Get2D ; call the Get subroutine
    endm ; value is returned in ArrayData
    #define Get2D(X, Y) #Get2D X, Y ; allows paretheses in macro
    ;-----------------------
    #Put2D macro X, Y ; value should be in ArrayData
    MOVE?BB X, _Xidx ; copy users X value to Xidx
    MOVE?BB Y, _Yidx ; copy users Y value to Yidx
    L?CALL _Put2D ; call the Put subroutine
    endm
    #define Put2D(X, Y) #Put2D X, Y ; allows paretheses in macro
    ;-----------------------
    #Clear2D macro
    L?CALL _Clear2D ; call the Clear subroutine
    endm
    #define Clear2D() #Clear2D
    ENDASM
    Last edited by fokus_1116; - 24th March 2010 at 03:46.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by fokus_1116 View Post
    i using mplab and PICBASIC-PRO2.4.....and where i should i put the ASM file..
    Exactly where it was.
    It's part of the program.

    However, it's likely that it won't work with PBP 2.40.
    And I'm not about to look and see why.

    Buy the upgrade.
    2.40 is at least 10 years old.
    <br>
    DT

  7. #7
    Join Date
    Mar 2010
    Posts
    40


    Did you find this post helpful? Yes | No

    Default

    thank for fast reply....now it can work..thank....

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