Post Reply 
Detecting presence of SD-card on HP-50g
07-17-2021, 05:07 PM
Post: #15
RE: Detecting presence of SD-card on HP-50g
(07-17-2021 12:29 PM)DavidM Wrote:  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

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.

Dear David,
The code you entered returns a string ("0") in both cases. Since it is a "0" in both cases, I wonder what the use of your program is. In any case, I can't detect if there is an SD card in my HP. Therefore, the original program discussed earlier in this thread is useful, and yours is not. Sincerely, Karel.

I use HP-16C, WP-34S emulator, HP-35s, HP-48GX, HP-50g, and HP Prime G2.
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 - cahlucas - 07-17-2021 05:07 PM



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