Is it possible to have several tables and change the pointer to any one?
I tried data=data1 but get- can't find data error. There doesn't seem to be a way without if then or select case which would be too slow.
It's been asked before. I'll try using strings instead. Is mid(stringvar) as fast as reading a table item?
It got complicated with strings. I want tables/arrays of glcd colours, 0's don't plot and re,bl,gn defined as ili9341 colours which are 16 bit numbers I think.
I'm using a 18f25k22
• Up to 64 Kbytes Linear Program Memory
I'm new to pics and haven't done basic since the 80's when you could use a rem statement to store data or code because you knew the address. Don't think that's useful now.
If I dim four arrays ,dim a1(100),a2(100)..could I find the address of 1st element and use that with peek?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you use arrays then just address the specific element or elements should be no need for peek or poke.
If you explain what outcome you are trying to achieve , and, some high level pseudo code - folks may be able to assist.
Anobium
P.S. if you using v0.98.00 RC4 please stop using. There is a very serious bug and results of pretty simple calcs with braces anda array elements with no yield the correct ASM or Hex file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's a simple sprite sub to plot/erase...or not plot/erase pixels on ili9341.
I need to be able to change sprite_data to point to sprite_data1 , 2 etc.
a 12x12 sprite is 144 bytes and a table is only 255 bytes so a big table is out.
I could read the tables into an array and use a pointer to each data set..hmm,I'll try that.
I'll look at the asm of some code and see how arrays and tables are done if I can follow it.
I changed my code to use select case and a var to use different tables but as the code stood it tested for each pixel in the table so was visually flickery.
Is it possible to have several tables and change the pointer to any one?
I tried data=data1 but get- can't find data error. There doesn't seem to be a way without if then or select case which would be too slow.
It's been asked before. I'll try using strings instead. Is mid(stringvar) as fast as reading a table item?
It got complicated with strings. I want tables/arrays of glcd colours, 0's don't plot and re,bl,gn defined as ili9341 colours which are 16 bit numbers I think.
I'm using a 18f25k22
• Up to 64 Kbytes Linear Program Memory
I'm new to pics and haven't done basic since the 80's when you could use a rem statement to store data or code because you knew the address. Don't think that's useful now.
If I dim four arrays ,dim a1(100),a2(100)..could I find the address of 1st element and use that with peek?
If you use arrays then just address the specific element or elements should be no need for peek or poke.
If you explain what outcome you are trying to achieve , and, some high level pseudo code - folks may be able to assist.
Anobium
P.S. if you using v0.98.00 RC4 please stop using. There is a very serious bug and results of pretty simple calcs with braces anda array elements with no yield the correct ASM or Hex file.
It's a simple sprite sub to plot/erase...or not plot/erase pixels on ili9341.
I need to be able to change sprite_data to point to sprite_data1 , 2 etc.
a 12x12 sprite is 144 bytes and a table is only 255 bytes so a big table is out.
I could read the tables into an array and use a pointer to each data set..hmm,I'll try that.
I'll look at the asm of some code and see how arrays and tables are done if I can follow it.
I changed my code to use select case and a var to use different tables but as the code stood it tested for each pixel in the table so was visually flickery.