Post Reply 
Is there an SD card present?
01-12-2017, 08:57 AM
Post: #1
Is there an SD card present?
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.
Find all posts by this user
Quote this message in a reply
01-12-2017, 02:35 PM
Post: #2
RE: Is there an SD card present?
I believe you'll find an answer at comp.sys.hp48.
Find all posts by this user
Quote this message in a reply
01-12-2017, 03:04 PM
Post: #3
RE: Is there an SD card present?
(01-12-2017 08:57 AM)grsbanks Wrote:  Any ideas?

Check here, this thread deals with same topic: https://groups.google.com/forum/#!topic/...ci_So2kmv0

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
01-12-2017, 03:08 PM
Post: #4
RE: Is there an SD card present?
(01-12-2017 03:04 PM)rprosperi Wrote:  Check here, this thread deals with same topic: https://groups.google.com/forum/#!topic/...ci_So2kmv0

Bookmarked -- thanks!

G. Stewart
Find all posts by this user
Quote this message in a reply
Post Reply 




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