Yup, safe bet![]()
Seems some day, we may no longer need to do like such. Few days ago, Darrel told in another thread there's a kind of lib override on the ToDo list (or in testing). Sounds like a good idea![]()
Yup, safe bet![]()
Seems some day, we may no longer need to do like such. Few days ago, Darrel told in another thread there's a kind of lib override on the ToDo list (or in testing). Sounds like a good idea![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
My initial testing with R5 (with arraywrite, but R5 is still pointer for that) is that it points to array ram location plus array position
so to find position in array, you have to subtract the base value from R5. You can find that in LIST file or declare location for array:
array1 var byte [100] $100 'start array1 at location $100, 256 dec in ram
so you know base val to subtract ??
don
I can probably issue CHK?RP and see where the first element is, then subtract that.
Charles Linquist
Darrel, forget what I said a couple of weeks ago. You need to get back to work! We need to easily be able add functionality like I'm talking about and to add our own keywords (I see some advances there already), and to be able to create something that is a semblance of real functions- something that would translate vars by position going into, and out of, a routine.
Charles Linquist
Using R5 does appear to work.
If I have a bunch of different strings that I need to parse, and a variable exists
right after the string - such as:
"power -state -T system:blade[X]"
Where "X" is a variable, the following always returns the right value.
"BladeNumber" contains the value of "X"Code:CMD1:Command=1:ARRAYREAD bigarray,30,CMD2,[WAIT ("power -on -T system:blade[")]:Goto GetNumber CMD2:Command=2:ARRAYREAD bigarray,30,CMD3,[WAIT ("power -off -T system:blade[")]:goto GetNumber CMD3:Command=3:ARRAYREAD bigarray,30,CMD4,[WAIT ("power -state -T system:blade[")]:goto GetNumber CMD4:Command=4:ARRAYREAD bigarray,30,ZeroOutAndRestart,[WAIT ("console -T system:blade[")]:Goto GetNumber ... GetNumber: Peek R5,BladeNumber
Charles Linquist
HI,
doesn't your R5 have something like ,27 or 28 or 29 plus mem location in ram ?
don
R5 has the RAM location of the NEXT item after the match. Which is the one I'm looking for. I don't care about the absolute address.
Charles Linquist
It isn't beautiful when we have access to the library code huh?
Good job Charles
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks