Tim,
Thanks for your attention.
Fault_num_worst is a variable, but I wanted to use its ADDRESS, rather than its value.
I am using arrays of mixed (Byte & Word) variable types in RAM, which are initialised from EEROM values. They are later updated in EEROM, if changed.
I understood that there was no "compound" TYPE definition available in PDS, where I could define my own type (mix of Byte & Word), which could then be accessed by index (like a 2 dimensional array).In PIC16, I was reading from EEROM[index] and writing to RAM[offset + index], inside a FOR/NEXT loop.
The index can be just the EEROM address (eg 24 .. 44).
However to write to the RAM (can't use CWRITE with PIC16), I had to know the RAM array "offset", which is the difference between RAM & EEROM address (for appropriate matching variables).
This was done with ASM, as partially ilustrated above.
However, I was wondering if there was a BAS Syntax for similar.
I have overcome (in PIC18 using 3.5.2.1), by using the AT format, as illustrated above. However, this requires an additional line per "requirement".
Previoulsy I had manually defined the address-values after examing ASM, but this can get "messy", if I add a variable lower in RAM, which changed addresses.
The VARPTR(var) adds run-time code, which was VERY tight in PIC16.
No big issue, if there is no syntax for using the address, so be-it.
Thanks
Alan.