No worries, It is used sparingly, and I know how easy it is to overlook errors having worked on something for a period. Who knows what other little tricks are being used that have yet to be noticed.
A 'FLAGS' type seems like a very good idea to cover BITS in addition to the bytes and words.Flag/bit names - again another slight catch 22 here - and an idea...
For scratch registers (typically R30 - R40 seem to be used a lot), sometimes it's several flags at once,
and sometimes its a genuine number mask (like for example A/D reads are only 10 bits). So where the AND and OR is done
with an immediate value, SAD looks for any bit names.
I was wondering whether to have a TYPE of variable as 'FLAGS' to define this behaviour, but it still wouldn't work for scratch/temp registers.
In the small number of bins I have looked at, the flags seem to be given pride of place below 0xff, so address range seems viable.
Yeah, scratch registers are unruly beasts, chopping and changing between bits, bytes and words.
Really need to define multiple subr address ranges where the scratch has a particular purpose for each range.
I don't follow how this would differ from adding BITS to bytes and words.BUT also have in the background the idea that you can declare data types and they would be tracked/transferable.....
- i.e Types
Plain Word, Byte, Flags (word,byte) Nothing. perhaps signed/unsigned ?
I think it would be possible to deduce clock speed from the code.IOtime (word/byte. long?) autoconvert to millisecs, but would require clock speed, unless I can spot a way to get it from code. (Timers subroutine?)
Code: Select all
ADvalue (word), auto convert to volts 0-5
In CARD I have x/4, x*8, x*16, x*32 & x*64RPM (word) auto convert (divide by 4) all are x4 as far as I can see. seems to be a standard
Yeah, needs a formula. I have CARD (Euro) pegged at Fº, but converted to Cº would be best.Temp ? trickier, as Euro tend to use C and US ones use F (well, A9L does, don't know if later ones went metric)
Yes SYM would work mostly. Could do with formulas and more than two decimal places for divisors, for all of S F T.After that so far I see other variables don't have a common calibration, but perhaps could declare them .
or perhaps allow the idea of a divisor/multiplier factor on all SYM (only on tables/funcs to 3.05) which get used in print phase ?
The the idea that when you do R34 = R36, or R34 =  the TYPE (or divisor) of the variable gets transferred to R34 as well as its value.
Yes tracking it through makes sense.
Do they though? Are you aware of any instances where it happens? I am not, but have I been paying enough attention!But then I can't decide if it's too complex....what if two different types get added ?
Thank you for the Flag examples, I shall add some later today.