Post Reply 
HP50 How to turn on or off some indicators ?
03-23-2017, 04:40 PM
Post: #1
HP50 How to turn on or off some indicators ?
At the address #0010Ch there is a nibble, and the value of its bits can
be used to turn on or off some indicators:
bit number function
0 busy indicator (1=on, 0=off)
1 transmit indicator (1=on, 0=off)
2 ?
3 show indicators? (1=on, 0=off)
So if I want to turn off the busy indicator, I have to read the nibble
at #0010C, turn its bits 0 to 0, and then leave.

Well it does nothing on HP 50g, does anybody know how to turn off indicators on this calc ?

Thanks,
sunhp
Visit this user's website Find all posts by this user
Quote this message in a reply
03-24-2017, 02:22 AM
Post: #2
RE: HP50 How to turn on or off some indicators ?
(03-23-2017 04:40 PM)sunhp Wrote:  Well it does nothing on HP 50g, does anybody know how to turn off indicators on this calc ?

The 50g O/S requires at least two different memory locations to be altered for changing the annunciators. In the case of the alert indicator, it's actually three (usually).

The source code below will compile with Debug4x -- you may need to alter it somewhat depending on your particular environment. It should give you the gist of what you need, though. It's basically a SysRPL program with embedded Saturn code objects that simply turns on all the annunciators, waits 5 seconds, then turns them back off before exiting.

Certain built-in operations inherently change the annunciators' status, so be aware that your code may have to deal with changes if you need them to remain set or cleared.

Hope this helps!
- David

Code:
ASSEMBLEM
   % Constants for the Annunciator bit locations below
   DC ANNUNCIATORS_IO 1
   DC ANNUNCIATORS_Alert 3
   DC ANNUNCIATORS_LShift 4
   DC ANNUNCIATORS_RShift 5
   DC ANNUNCIATORS_Alpha 6
   DC ANNUNCIATORS_Busy 7

   DC ANNCTRL_LShift 0
   DC ANNCTRL_RShift 1
   DC ANNCTRL_Alpha 2
   DC ANNCTRL_Alert 3
   DC ANNCTRL_Busy 4
   DC ANNCTRL_IO 5

   DC PASTDUE_flag 0
!RPL

RPL
::

   ClrDA1IsStat   ( suspend clock )
   RECLAIMDISP    ( set, clear and resize text display )
   TURNMENUOFF    ( turn off menu )
   GARBAGE        ( force a garbage collection )

   CODEM
      % Turn ON ALL Annunciators

      AD1EX                      % save the contents of D1 into A

      D1=(5)ANNUNCIATORS         % load address of ANNUNCIATORS in D1
      C=DAT1 B                   % copy the byte into C.B
      CBIT=1 ANNUNCIATORS_IO     % turn on the I/O Annunciator bit
      CBIT=1 ANNUNCIATORS_Alert  % turn on the Alert Annunciator bit
      CBIT=1 ANNUNCIATORS_LShift % turn on the Left Shift Annunciator bit
      CBIT=1 ANNUNCIATORS_RShift % turn on the Right Shift Annunciator bit
      CBIT=1 ANNUNCIATORS_Alpha  % turn on the Alpha Annunciator bit
      CBIT=1 ANNUNCIATORS_Busy   % turn on the Busy Annunciator bit
      DAT1=C B                   % write the byte back to memory

      D1=(5)ANNCTRL              % load address of ANNCTRL in D1
      C=DAT1 B                   % copy the byte into C.B
      CBIT=1 ANNCTRL_IO          % turn on the I/O Annunciator bit
      CBIT=1 ANNCTRL_Alert       % turn on the Alert Annunciator bit
      CBIT=1 ANNCTRL_LShift      % turn on the Left Shift Annunciator bit
      CBIT=1 ANNCTRL_RShift      % turn on the Right Shift Annunciator bit
      CBIT=1 ANNCTRL_Alpha       % turn on the Alpha Annunciator bit
      CBIT=1 ANNCTRL_Busy        % turn on the Busy Annunciator bit
      DAT1=C B                   % write the byte back to memory

      % set PASTDUE flag so that Alert annunciator will be left intact
      D1=(5)PASTDUE              % load address of PASTDUE into D
      C=DAT1 B                   % copy D1.B into C
      CBIT=1 PASTDUE_flag        % set appropriate bit (defined above) to 1
      DAT1=C B                   % copy C.B back into memory at PASTDUE

      D1=A                       % reset D1 to original value

      RPL                        % return to RPL
   ENDCODE

   ( wait 5 seconds )
   %5 dowait

   CODEM
      % Turn OFF ALL Annunciators

      AD1EX                      % save the contents of D1 into A

      D1=(5)ANNUNCIATORS         % load address of ANNUNCIATORS in D1
      C=DAT1 B                   % copy the byte into C.B
      CBIT=0 ANNUNCIATORS_IO     % turn off the I/O Annunciator bit
      CBIT=0 ANNUNCIATORS_Alert  % turn off the Alert Annunciator bit
      CBIT=0 ANNUNCIATORS_LShift % turn off the Left Shift Annunciator bit
      CBIT=0 ANNUNCIATORS_RShift % turn off the Right Shift Annunciator bit
      CBIT=0 ANNUNCIATORS_Alpha  % turn off the Alpha Annunciator bit
      CBIT=0 ANNUNCIATORS_Busy   % turn off the Busy Annunciator bit
      DAT1=C B                   % write the byte back to memory

      D1=(5)ANNCTRL              % load address of ANNCTRL in D1
      C=DAT1 B                   % copy the byte into C.B
      CBIT=0 ANNCTRL_IO          % turn off the I/O Annunciator bit
      CBIT=0 ANNCTRL_Alert       % turn off the Alert Annunciator bit
      CBIT=0 ANNCTRL_LShift      % turn off the Left Shift Annunciator bit
      CBIT=0 ANNCTRL_RShift      % turn off the Right Shift Annunciator bit
      CBIT=0 ANNCTRL_Alpha       % turn off the Alpha Annunciator bit
      CBIT=0 ANNCTRL_Busy        % turn off the Busy Annunciator bit
      DAT1=C B                   % write the byte back to memory

      D1=(5)PASTDUE              % load address of PASTDUE into D
      C=DAT1 B                   % copy D1.B into C
      CBIT=0 PASTDUE_flag        % set appropriate bit (defined above) to 0
      DAT1=C B                   % copy C.B back into memory at PASTDUE

      D1=A                       % reset D1 to original value

      RPL                        % return to RPL
   ENDCODE

   ClrDAsOK ( tell the OS to redraw the screen at the next opportunity )
;
Find all posts by this user
Quote this message in a reply
03-24-2017, 09:11 PM
Post: #3
RE: HP50 How to turn on or off some indicators ?
Excellent, thank you very much DavidM !
How did you discovered that ?
Visit this user's website Find all posts by this user
Quote this message in a reply
03-24-2017, 11:51 PM
Post: #4
RE: HP50 How to turn on or off some indicators ?
I no longer have a source reference for this, but I'm fairly sure that it was pieced together from a combination of snooping around in Suprom49.a (included with Debug4x) along with some judicious searching of the comp.sys.hp48 newsgroup. The tidbit about setting the PASTDUE flag was definitely a clue from a post to that newsgroup, probably this one from Jonathan Busby.

I'll confess that I usually search that newsgroup first when looking for programming hints related to the 48-50 systems. There's a wealth of knowledge there, provided you've got the time to weed through it.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)