News:

  • June 07, 2026, 12:55:17 PM

Login with username, password and session length

Author Topic: Bit masking  (Read 40889 times)

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: Bit masking
« Reply #15 on: March 20, 2013, 11:10:55 PM »
A cast isn't a source/destination thing, it is just a re-interpretation of the data at a location. The casting issue here is alignment, and related to how RISC style processors work. When you are doing an extraction cast (bigger to smaller), wrong answers aren't possible, but aggregation casts (smaller to larger) can result in mis-alignments that the processor architecture can't handle. So any time you are aggregating, the data must be aligned on the boundary of the cast size...bytes, words, or dwords. So C96 is a great choice because it is valid for bytes, words, or dwords...and was close to his specified range.

Of course -- senior moment on my part!  :D  I was mixing thoughts about casting and MOVEing between different size source and destination and wanted to make sure that MOVER didn't need to be word-aligned.  Thanks.
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: Bit masking
« Reply #16 on: March 20, 2013, 11:21:16 PM »
Of course -- senior moment on my part!  :D

Dude...I understand that more and more all the time. More and more... ::)
"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

DLTimmons

  • Hero Member
  • *****
  • Posts: 232
Re: Bit masking
« Reply #17 on: March 21, 2013, 09:19:04 AM »
BobO

What help me was finnaly finding the help page on casting. In the old gw basic you bit masked to get bit out of a Byte word or double word. It would have helped me to have a link in the help files that routed bit masking to the casting page.

All part of the learing curve, You still have a very powerful processor the more power the larger the learnming curve :)

Senior moment more like senior hour ::)

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: Bit masking
« Reply #18 on: March 21, 2013, 09:34:40 AM »
BobO

What help me was finnaly finding the help page on casting. In the old gw basic you bit masked to get bit out of a Byte word or double word. It would have helped me to have a link in the help files that routed bit masking to the casting page.

All part of the learing curve, You still have a very powerful processor the more power the larger the learnming curve :)

Senior moment more like senior hour ::)

Do-more is...um...extensive. ;) There really is a lot here. Often the issue isn't whether it can do something, it's which way is best to do it. Our hope is that the power users can do everything they want to, but that it's also comfortable for the folks who have more basic needs. I think it fits that, but I'm probably too close to it to be a good judge.
"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