The first value is 16, which is the low byte of the table length. If you look at the code then the table length is 272 = 0x110, where the low byte is is 0x10-16. :-)
The second value is 34, Escape value for DQuote.
The next 26values are the string.
Then, value 34 Escape value for DQuote.
Then, value 0 Escape value for \&000 which is our end of string marker. :-)
And, I have just run all the static tests using the updated preprocessor.bi
The new method threw up some syntax issues with a library that is easily fixed. The issue was a Dquote that was not terminated correcty. So, the new method is catching a latent bug.
Apart from the issue above. Passed.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
An indexed version of the menu system using \0 as the end of string. Loads the pointers into an array - this is created during the init. Then, the menu is displayed using the pointers.
Used more RAM but could be faster. If the speed is critical then this may the way to go....
Wow! this has got complicated.
I just thought a table of bytes to represent ascii chrs and a unused end or string value.
just jump from unused chr to next to find indexed string data in table.
Why I'd want string 13 dunno but it's all got complicated.
the idea a table or eprom is not limited ram makes sense.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Stan, it will work with simple strings, & easy to index.
If there only a few strings its easy to code a pointer table or index fixed length(if strings are same len) . & also yes a separator character can be part of the string.
I have a tool that user can paste in a string table & it spits out a pointer table to paste back in GCB code.
Will make some examples soon to demonstrate ...
For simple strings the only caveat would be not to have the esc pattern in your string ?
Last edit: ToniG 2021-03-18
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
And, an analysis of the table created.....
The first value is 16, which is the low byte of the table length. If you look at the code then the table length is 272 = 0x110, where the low byte is is 0x10-16. :-)
The second value is 34, Escape value for DQuote.
The next 26values are the string.
Then, value 34 Escape value for DQuote.
Then, value 0 Escape value for \&000 which is our end of string marker. :-)
And, I have just run all the static tests using the updated preprocessor.bi
The new method threw up some syntax issues with a library that is easily fixed. The issue was a Dquote that was not terminated correcty. So, the new method is catching a latent bug.
Apart from the issue above. Passed.
And, continuing the testing. This works - a mixed TABLE of strings and 'old' numbers.
Shows this using the /&000 terminated strings. Which is correct. :-)
Added \0 - totally make sense. See attachment ( will attached after post)
Latest now supports \0
"Diag Item 1\0", "Diag Item 2\0", "Diag Item 3\0", "Diag Item 4\0"
A null was a follows. The new is a lot simpler. Note: \ &000 is still valid.
"Diag Item 1\&000", "Diag Item 2\ &000", "Diag Item 3\ &000", "Diag Item 4\ &000"
Test table
Last edit: Anobium 2021-03-18
An indexed version of the menu system using \0 as the end of string. Loads the pointers into an array - this is created during the init. Then, the menu is displayed using the pointers.
Used more RAM but could be faster. If the speed is critical then this may the way to go....
Enjoy
Another method to index. This time to index into Progmem. This code creates the indexes ( tble location and length of each table string) in Progmem.
The script calcs the top end of memory to put the indexes. And the using PROGMEMWRITE and PROGRAMREAD you can place the indexes in Progmem.
I had to use a 16F18855 but this will work on many, ,manay 18F e3tc.
Code is the same for other posted but the location of progmem has to calculated. Less memory as not an array!
The picture shows the terminal with the menu strings, plus the PICKitPlus software having read the Progrmem - its shows the indexes.
:-)
Last edit: Anobium 2021-03-19
Wow! this has got complicated.
I just thought a table of bytes to represent ascii chrs and a unused end or string value.
just jump from unused chr to next to find indexed string data in table.
Why I'd want string 13 dunno but it's all got complicated.
the idea a table or eprom is not limited ram makes sense.
Stan, it will work with simple strings, & easy to index.
If there only a few strings its easy to code a pointer table or index fixed length(if strings are same len) . & also yes a separator character can be part of the string.
I have a tool that user can paste in a string table & it spits out a pointer table to paste back in GCB code.
Will make some examples soon to demonstrate ...
For simple strings the only caveat would be not to have the esc pattern in your string ?
Last edit: ToniG 2021-03-18
@ToniG
In the GCB source - I see.
/* '< Comment block works but does not show in GCB(SynWrite) editor
What is the issue?
The commented block does not show up as green in the editor, even though it is seen as commented by the compiler. (Like commenting a block in FBedit)
Please try RC43. You may be using an old version of the lexer file (part of the IDE). The lexer file was updated to support block comments.