I want to store ASCII strings to ROM code space via the .hex file. In some languages this would be done with CONST or ROM. The purpose is to read the string out one byte at a time at run-time with the GCBASIC ProgramRead command.
CONST TestVar(10) = "ABCDEFG"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Tables would work nicely if I can enter the table as a character literal but I don't see that in the manual. The end product will be customized for each customer and I'd rather enter the desired character string into the source code as ASCII.
I suppose I could write a simple PC program to convert an ASCII string to a GCBASIC Table definition if I needed to. Then copy and paste it into the source code.
(Currently comparing GCBASIC to JALV2 in the process of selecting a free PIC tool.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Many years later... and I find this question while looking for an answer for the same problem!
I tried to use tables, but large tables don't work correctly. I need to store a large number of numbers in the range of 0 to 1600 at programming time, and read them out in the program as needed. Storing one value per 14 bit word seems like a good option - but I fail to see how to do it in GCB!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I want to store ASCII strings to ROM code space via the .hex file. In some languages this would be done with CONST or ROM. The purpose is to read the string out one byte at a time at run-time with the GCBASIC ProgramRead command.
CONST TestVar(10) = "ABCDEFG"
Tables would work nicely if I can enter the table as a character literal but I don't see that in the manual. The end product will be customized for each customer and I'd rather enter the desired character string into the source code as ASCII.
I suppose I could write a simple PC program to convert an ASCII string to a GCBASIC Table definition if I needed to. Then copy and paste it into the source code.
(Currently comparing GCBASIC to JALV2 in the process of selecting a free PIC tool.)
Many years later... and I find this question while looking for an answer for the same problem!
I tried to use tables, but large tables don't work correctly. I need to store a large number of numbers in the range of 0 to 1600 at programming time, and read them out in the program as needed. Storing one value per 14 bit word seems like a good option - but I fail to see how to do it in GCB!