HP Forums
Is there an SD card present? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: Is there an SD card present? (/thread-7560.html)



Is there an SD card present? - grsbanks - 01-12-2017 08:57 AM

Hi all,

I've been writing a wrapper around the ARCHIVE and RESTORE functions to do a system backup complete with stack contents, flags and current PATH either to the SD card if one is present or to Flash ROM if not. This is on a 50g.

I do have a way of detecting the presence of an SD card using the following in userRPL:

Code:

%%HP: T(3)A(R)F(.);
\<<
  :3: X
  @ Make sure last args are saved @
  RCLF -55 CF \-> n f \<<
  @ Try to recall something from port 3 @
  IFERR n RCL
  THEN
    @ Couldn't RCL it, so try and STO something @
    1 SWAP
    IFERR STO
    @ Assume no SD card if we can't @
    THEN DROP2 0
    ELSE n PURGE 1
    END
  @ No error RCL'ing so we must have an SD card @
  ELSE DROP 1
  END
  f STOF
  \>>
\>>

It just seems a bit long-winded having to do all of this probing in port 3 just to see if there's an SD card present. Is there not a SysEval or something else that will give me the same information? Running search engine queries to find this information throws up oodles of documents explaining how to use an SD card assuming one is present, not how to detect its presence in the first place.

Any ideas?

Cheers,
G. Stewart.


RE: Is there an SD card present? - MNH - 01-12-2017 02:35 PM

I believe you'll find an answer at comp.sys.hp48.


RE: Is there an SD card present? - rprosperi - 01-12-2017 03:04 PM

(01-12-2017 08:57 AM)grsbanks Wrote:  Any ideas?

Check here, this thread deals with same topic: https://groups.google.com/forum/#!topic/comp.sys.hp48/Eci_So2kmv0


RE: Is there an SD card present? - grsbanks - 01-12-2017 03:08 PM

(01-12-2017 03:04 PM)rprosperi Wrote:  Check here, this thread deals with same topic: https://groups.google.com/forum/#!topic/comp.sys.hp48/Eci_So2kmv0

Bookmarked -- thanks!

G. Stewart