Hi Matt,

You've got a nice library there, and I suspect it may be pretty fast
too.

But we'd like more features. :-)

Here are some half-baked ideas.

1.  A compile-time constant for total max memory usage for large
arrays is fine.
2.  We can get by with just your dword-width arrays, and do a little
index arithmetic and shifting when dealing with byte and word widths
2.  We'd like to be able to allocate more than one array, and
preferably a mix of different widths (byte, word, or dword)
3.  We'd like to do the allocation at run-time, not at compile time:
        var word handle1 = large_byte_array(300)
        var word handle2 = large_byte_array(300)
        var word handle3 = large_word_array(999)
        var word handle4 = large_dword_araay(400)
        notes: we have a mix of byte arrays (handle1 and handle2),
word array: handle3, and a dword array(handle4)
        yes, the numbers above may be more than your typical 18F ram
max. They are just for example.
4. We need a cool way to actually use the 'dynamic' large arrays.  No
ideas yet on that...  So until then:
        x = get_large_byte_array(handle1, some_index)
        put_large_byte_array(handle2, some_index, x)
        not nearly so cool as your approach, but we can do more than
one array, and we can do a mix of arrays.
5.  It would be a real 'bonus' if we could 'free' the array after use,
but that can wait until later. :-)

William


On Nov 7, 12:41 am, mattschinkel <[email protected]> wrote:
> I have created a lib for creating 1 large array.
>
> I tested and added these files to SVN
> \include\jal\large_array.jal
> \sample\18f452_large_array.jal
>
> Tested on 18F, It took lots of code to do this, but works great.
>
> Let me know what you think. As you know, you can not currently have an
> array that takes up more then 256 bytes memory.
>
> -- Notes:
> -- Supports byte array with up to 2048 entries
> -- Supports word array with up to 1024 entries
> -- Supports dword array with up to 512 entries
> -- Creates an array named large_array_1
> -- Use "alias new_array_name is large_array_1" to rename the array
> --
> -- Example:
> -- const dword ARRAY_SIZE = 600          -- choose number of array
> variables
> -- const dword ARRAY_VARIABLE_SIZE = 2    -- choose size of variables
> (byte*2)
> -- include large_array                    -- include the array library
> -- alias test is large_array_1            -- rename/alias the array to
> test
> --
>
> Matt.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to