News:

  • August 04, 2026, 05:28:12 PM

Login with username, password and session length

Author Topic: ALHILO not working with pointers?  (Read 8633 times)

Bolt

  • Hero Member
  • *****
  • Posts: 598
ALHILO not working with pointers?
« on: May 23, 2023, 02:57:49 PM »
I re-wrote some code the other day, and added the ALHILO instruction to set my alarm bits. However, it's in a FOR/NEXT loop, and it seems to not be working as intended. If I write it as >, < ladder rungs, it works fine. Here's a screenshot showing an example of it not working, .Lo should be set.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6170
  • Yes Pinky, Do-more will control the world!
Re: ALHILO not working with pointers?
« Reply #1 on: May 23, 2023, 03:13:45 PM »
It's working fine for me. If you want to email your code to support, I'm happy to take a look.
"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

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6170
  • Yes Pinky, Do-more will control the world!
Re: ALHILO not working with pointers?
« Reply #2 on: May 23, 2023, 04:24:21 PM »
You used Level.Hi and Level.Lo where you meant to use .HiHi and .LoLo.

I guess I should blame us. As wide as these elements are with the nested structs and array refs and the display doesn't show the entire element name, it's really easy to make a mistake like this. I only caught it in the cross reference. Saw the .Hi and .Lo duplicated where clearly it should have been .HiHi and .LoLo.
"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

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3839
    • Host Engineering
Re: ALHILO not working with pointers?
« Reply #3 on: May 23, 2023, 04:30:50 PM »
That explains why the alarm bit trend only had 2 elements, not 4.

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: ALHILO not working with pointers?
« Reply #4 on: May 23, 2023, 06:39:11 PM »
Doh, I got carried away with the nested pointer structures and copy and paste, didn't get them all straight. I guess I shoulda/coulda figured that one out myself. I was kinda ignoring the mini trend view as it presumably wasn't populating data inside the FOR loop. Thanks!