Post Reply 
Detecting presence of SD-card on HP-50g
07-17-2021, 12:29 PM (This post was last modified: 07-17-2021 12:38 PM by DavidM.)
Post: #13
RE: Detecting presence of SD-card on HP-50g
(07-15-2021 11:48 AM)BINUBALL Wrote:  ...I change PushF/TLoop into PushT/FLoop and program now working well.

But it shouldn't, so something odd is happening with your calculator or sd card. Making that change would provide the opposite boolean value to what is intended (no card inserted -> TRUE, card is present -> FALSE).

Would you mind compiling this code on your calculator and post the results for two test cases:

1) run with card inserted
2) run with no card inserted

Thanks!

Code:
!NO CODE
!RPL
::
   CK0NOLASTWD
   RunSafeFlags ::
      64 dostws
      DOHEX
      CODE
         SAVE
         A=0 W
         P=8
         ACCESSSD
         P=15
         GOVLNG "PUSHhxsLoop"
      ENDCODE
      hxs>$
      BINT3 LAST$
   ;
;
@

The above code object performs the same basic SD operation as the original program ( P=8 ACCESSSD ), but instead of returning a boolean value, it leaves the contents of the A register on the stack as a hex string. The A register is where the ACCESSSD command leaves its results in this situation, so this program simply shows the full result of the command instead of doing something with it.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Detecting presence of SD-card on HP-50g - DavidM - 07-17-2021 12:29 PM



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