(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 )
;