Re: BBC BASIC for iOS?

Richard Russell
 

On Tue, Dec 19, 2017 at 08:41 am, Richard Russell wrote:
So there are many issues to resolve before an iOS edition could be contemplated, and there may not be solutions for all of them. 
I've 'acquired' a hand-me-down iPhone (5S) from SWMBO, which has prompted me to take an interest in this topic again.  One thing I've definitely established is that iOS does not allow arbitrary code execution (it's not an App Store limitation, iOS itself prevents it) which of course means that neither BBC BASIC's assembler (not that we have one for 64-bit ARM!) nor the CALL statement and USR function, would be usable.  Considering how important the ability to run machine code is to BBC BASIC (for example some of the libraries depend on it, notably SOCKLIB and SORTLIB in BBCSDL) this is problematical.

The issue of SORTLIB is the more easily worked around, because it is of course possible to implement the same functionality in BASIC code.  It would only run at a fraction of the speed, but it might be good enough for some applications.  There is also the possibility, in principle, of adding a native SORT keyword to BBC BASIC (many BASICs do have that capability).

I don't know of any workaround for SOCKLIB however.  SDL_net, unfortunately (and stupidly in my opinion) provides no non-blocking 'read from network' capability, which is frequently a requirement - to be able to get on with other things, or monitor for an abort, while waiting for data to arrive.  I solve that at present by performing the 'blocking' read in another thread, but of course the only way to create a new thread in BBC BASIC is to use assembler code.

So, given all that, what is the consensus of opinion on whether developing an iOS edition of BBCSDL would be worthwhile or not?  I've always argued that BBC BASIC without an assembler isn't truly BBC BASIC, but you can't fight Apple!

Richard.

Join bb4w@groups.io to automatically receive all group messages.