Post Reply 
Detecting presence of SD-card on HP-50g
07-15-2021, 04:53 AM
Post: #5
RE: Detecting presence of SD-card on HP-50g
(07-15-2021 12:35 AM)DavidM Wrote:  The following Saturn code object will leave TRUE on the stack if a card is present or FALSE if no formatted card is available. It can be used within a SysRPL program compiled on the 50g as needed. Full disclosure: this is not my code, it was contributed by Claudio Lapilli in the comp.sys.hp48 newsgroup long ago. All credit is due to him for this quick and efficient implementation.

Code:
CODE
   P=8
   ACCESSSD
   P=7
   A+1 P
   P=0
   GOVLNG "PushF/TLoop"
ENDCODE

Note: always turn the calculator off before inserting or removing the SD card!

Dear David,
Thank you very much for your response! I've entered the code and tested it, and it works as expected. That means I can continue with my program. Thank you very much for this! Another question: Why is it important to turn off the calculator before inserting or removing the SD card? 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-15-2021 04:53 AM



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