Hi Kiste, It would be nice to have larger arrays than only 2k. Maybe we should add large_array_4k.jal, large_array_8k.jal, large array_16k.jal. You can generated those with your script, right?
As suggested by Rob Hamerling, it would be nice to have a Python version so you can run it both on a Windows machine and a Linux machine. Kind regards, Rob ________________________________ Van: 'Oliver Seitz' via jallib <[email protected]> Verzonden: zondag 13 december 2020 17:10 Aan: [email protected] <[email protected]> Onderwerp: Re: [jallib] Large_array update Hi Rob, I've been optimizing the generated code the last few days, there's not much of Matt's left... But the compiled size is in most cases significantly smaller (like 1100 words less) and in some cases quite a bit faster (running a test program in 66% of the time). Now I was thinking about the lot of comments and nearly-static parts of the code, which is now duplicated in my script. Bash is not very good in outputting nearly-identical text to several files, so your suggestion to use another language is very much appreciated! :-) If anyone's interested, this is how the "address decoding" works now: -- get a value from a large byte array function large_array_1'get(word in address) return byte is var byte data if LARGE_ARRAY_1_SIZE > 1792 then if address >= 1792 then data = _large_array_1_byte_8h[address - 1792] elsif address >= 1536 then data = _large_array_1_byte_7h[address - 1536] elsif address >=... This is what it looks like now: -- get a value from a large byte array function large_array_1'get(word in address) return byte is var byte data var byte address_lo at address+0 var byte address_hi at address+1 if LARGE_ARRAY_1_SIZE > 1792 then case address_hi of 07 : data = _large_array_1_byte_08_08[address_lo] 06 : data = _large_array_1_byte_07_08[address_lo] 05 : data = _large_array_1_byte_06_08[address_lo] ... This example is from the byte/PIC16 library, which is the easiest to do. Especially the PIC14 libraries with 80-byte arrays are not that easy to decode, but using a case statement instead of a chain of elsif's justifies the address calculations. Greets, Kiste Am Sonntag, 13. Dezember 2020, 16:23:09 MEZ hat Rob Hamerling <[email protected]> Folgendes geschrieben: Hello Kiste On 09/12/2020 15.29, 'Oliver Seitz' via jallib wrote: Attached you'll find a bash script which generates the large_array libs, including the output files adjusted to cover the so-far largest RAM space in a single array. Nice feature! Since bash is not particularly cross-platform, it would be nice to translate it to Python. I believe there exist 'bash-to-python' scripts which might do the job. Regards, Rob. -- Rob Hamerling, Vianen, NL -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/c1e158e0-71df-5f5e-df12-c5c35e6de3cf%40gmail.com<https://groups.google.com/d/msgid/jallib/c1e158e0-71df-5f5e-df12-c5c35e6de3cf%40gmail.com?utm_medium=email&utm_source=footer> . -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/1718307422.188029.1607875858499%40mail.yahoo.com<https://groups.google.com/d/msgid/jallib/1718307422.188029.1607875858499%40mail.yahoo.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/AM0PR07MB6241EDA59FD114EF6EC33B87E6C80%40AM0PR07MB6241.eurprd07.prod.outlook.com.
