Host Engineering Forum
General Category => General Discussion => Topic started by: Dean on May 08, 2017, 04:31:53 PM
-
Being a neophyte to this whole thing, I often wonder about certain instructions and what their real world purpose is. This is one of them. What would you use this instruction to accomplish? I used the example in the help file, of SDT0.Seconds, and set the DATA window to show it in binary, so I get what's going on, but how is this used?
-
Number of alarms
-
How would one relate this to a number of alarms?
-
If you have a number of alarms that are reflected by say C0 to C10, you could use SUMBITS to know how many there are active.
Other uses might include knowing if any bit is on in a byte or word.
-
Other uses might include knowing if any bit is on in a byte or word.
I think if I wanted to do that, I'd just do an equality check with 0.
-
I could come up with quite a few possible application uses...but...I could probably also do the same things with other Do-more instructions. I'm pretty sure the real reason it is in Do-more is because it was in DL.
-
I didn't know that! I thought it was a new Do-More thing. Never used it in Classic.
-
I didn't know that! I thought it was a new Do-More thing. Never used it in Classic.
Maybe I imagined that. There were a number of fairly obscure and oddly named instructions that we implemented in Do-more strictly because they existing in DL, but this might not have been one. We might also have conjured it up because it sounded interesting...a "how many things are currently in this shift register or bit mask" kind of thing.
-
Well, I actually meant that I assumed it was a Do-More thing, because I didn't remember it from DLX. Now you've got me curious, I'm going to go look.
-
Well, I actually meant that I assumed it was a Do-More thing, because I didn't remember it from DLX. Now you've got me curious, I'm going to go look.
I understood. I may be mis-remembering. My rememberer is out of calibration these days.
-
Yeah, I just went and checked, and it doesn't appear in the instruction help nor the instruction automatch (for a 260).
-
Yeah, I just went and checked, and it doesn't appear in the instruction help nor the instruction automatch (for a 260).
I don't know how useful it is, but admit it, it's fun to say "SUMBITS" in your best Buford T. Justice voice. ;)
-
That's really the key factor in the entire discussion. ;D
-
I was discussing my question with a colleague, and actually said the word out loud for the first time this morning. This is the first thing that went through my head. :D
I don't know how useful it is, but admit it, it's fun to say "SUMBITS" in your best Buford T. Justice voice.
-
That's really the key factor in the entire discussion. ;D
Well...yeah. ;)
-
The instruction in DirectLogic was just called SUM.
Like BobO said, there are probably better ways. Dean asked for an example and that was just one of the first things to come to mind.
-
The instruction in DirectLogic was just called SUM.
So my rememberer may be out of calibration, but happened to be correct this time. Broken clocks and whatnot. Cool.