Post Reply 
Detecting presence of SD-card on HP-50g
07-17-2021, 10:36 PM (This post was last modified: 07-18-2021 12:00 AM by BINUBALL.)
Post: #17
RE: Detecting presence of SD-card on HP-50g
(07-17-2021 12:29 PM)DavidM Wrote:  
(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.
It's very interesting. I've tested.

Edited) My typed code had a typo. Sorry.
P=5 -> P=15

1) run with card inserted : "395A8000"
2) run with no card inserted : "FFFFFF38"

After almost 10 times warmstart, it became like this.
1) run with card inserted : "39580000"
2) run with no card inserted : "FFFFFF38"

Edited) And recently I warmstart 50g, it gives invalid card data. Claudio's program now working with PushF/TLoop. Strange behavior, for yesterday I remembered it worked with PushT/FLoop.

Edited) After warmstart 50g, on port 0, has strange external files which 2 bytes. I can list some of strange file. Sometimes if I tried to go port 0, insufficient memory happens.

ROMPTR 0 12
ROMPTR 336 44E
PTR 894E7
PTR 9B083
PTR 9B6B6
PTR 89531
PTR BAD22
ROMPTR 177 1C1
ROMPTR FAA 180
PTR 51A02
PTR D2261
ROMPTR 4D6 56E
PTR F77E6
And so on..

S.Korean / HP-50G | fx-570EX | fx-570CW | HP-200LX
Visit this user's website 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 - BINUBALL - 07-17-2021 10:36 PM



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