News:

  • June 10, 2026, 10:28:55 PM

Login with username, password and session length

Author Topic: SUMBITS  (Read 24926 times)

Dean

  • Sr. Member
  • ****
  • Posts: 73
SUMBITS
« 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?
10 Lather
20 Rinse
30 GOTO 10

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: SUMBITS
« Reply #1 on: May 08, 2017, 08:10:08 PM »
Number of alarms

Dean

  • Sr. Member
  • ****
  • Posts: 73
Re: SUMBITS
« Reply #2 on: May 09, 2017, 07:33:17 AM »
How would one relate this to a number of alarms?
10 Lather
20 Rinse
30 GOTO 10

ADC Product Engineer

  • Hero Member
  • *****
  • Posts: 270
Re: SUMBITS
« Reply #3 on: May 09, 2017, 08:24:45 AM »
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.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: SUMBITS
« Reply #4 on: May 09, 2017, 09:07:31 AM »
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 retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: SUMBITS
« Reply #5 on: May 09, 2017, 10:47:01 AM »
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.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: SUMBITS
« Reply #6 on: May 09, 2017, 12:43:05 PM »
I didn't know that!  I thought it was a new Do-More thing.  Never used it in Classic.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: SUMBITS
« Reply #7 on: May 09, 2017, 12:51:07 PM »
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.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: SUMBITS
« Reply #8 on: May 09, 2017, 01:06:04 PM »
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 retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: SUMBITS
« Reply #9 on: May 09, 2017, 01:08:01 PM »
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.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: SUMBITS
« Reply #10 on: May 09, 2017, 01:09:03 PM »
Yeah, I just went and checked, and it doesn't appear in the instruction help nor the instruction automatch (for a 260).
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: SUMBITS
« Reply #11 on: May 09, 2017, 01:12:52 PM »
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. ;)
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: SUMBITS
« Reply #12 on: May 09, 2017, 02:12:05 PM »
That's really the key factor in the entire discussion.   ;D
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

Dean

  • Sr. Member
  • ****
  • Posts: 73
Re: SUMBITS
« Reply #13 on: May 09, 2017, 02:29:21 PM »
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
Quote
I don't know how useful it is, but admit it, it's fun to say "SUMBITS" in your best Buford T. Justice voice.
10 Lather
20 Rinse
30 GOTO 10

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: SUMBITS
« Reply #14 on: May 09, 2017, 02:44:46 PM »
That's really the key factor in the entire discussion.   ;D

Well...yeah. ;)
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO