Jump to content
IGNORED

App Key support in BASIC? Need insight.


Recommended Posts

Hello, everyone. 

 

@jamm has checked in the bits of code to support what we call "App Keys" on the #FujiNet.

 

More documentation info can be found here: 

https://github.com/FujiNetWIFI/fujinet-platformio/wiki/SIO-Commands-for-Device-ID-%2470  as commands $DB to $DE

 

These provide a key/value store for applications to store and retrieve configuration information on the FujiNet.

 

Since these are implemented as SIO calls, and are outside of the purvey of the N: device, they need to be accessed as direct SIO calls, so a solution needs to be made that can be easily embeddable in BASIC.

 

The idea is to embed machine code in strings, something like:

 

OPENKEY$="..."
CLOSEKEY$="..."
READKEY$="..."
WRITEKEY$="..."

For Open/close, you'd have use a 6 byte string, e.g. KEY$, containing the app key to open/close.

For Read/Write, you'd have a 66 byte output, VAL$, containing the 64 byte contents to return.

 

How can we make it so that we can do:

 

KEY$="......":X=USR(ADR(OPENKEY$))
X=USR(ADR(READKEY$)):? VAL$
VAL="New Value":X=USR(ADR(WRITEKEY$)

 

Thoughts, guys?

-Thom

Link to comment
Share on other sites

What about using the AUX2 field in the OPEN / CLOSE / INPUT / PUT / GET, etc. commands to specify a memory address for the routine in question, then embedding the requisite assembly string between the ending quotes?  Something like:

 

OPEN #1,12,1536,"N:assembly-as-atascii-string-goes-here"

 

Then use the regular Atari BASIC I/O commands to receive output from and interact with the resident app?

Link to comment
Share on other sites

Yeah, my fault - I meant to specify aux2 as a memory page value, not the decimal equivalent.  Derp.

 

My thought was that the handler could intercept the aux2 value, poke the supplied string in at that page number (not necessarily ideal, but at least representable in 8 bits), and then call it.  But if there's no way for the devicespec to know that it's being sent assembly, it's a moot point.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...