BBCSDL v1.07 INKEY(-256)

Discussions about the BBC BASIC language, with particular reference to BB4W and BBCSDL
mavison
Posts: 34
Joined: Tue 03 Apr 2018, 17:27

BBCSDL v1.07 INKEY(-256)

Post by mavison »

I have just tried to run code on a Mac which has run OK before, and I have now seen an oddity.

INKEY(-256) returns 83, &53 or "S" on Windows, and used to on the Mac.
However, on the Mac it now seems to return 115, &73 or "s" (lower case).

Note that BBCSDL was v0.26 but is now v1.07
and MacOS was 10.10 but is now v10.15

Is there a list anywhere of what values BBCSDL INKEY(-256) can return?
RichardRussell

Re: BBCSDL v1.07 INKEY(-256)

Post by RichardRussell »

mavison wrote: Mon 25 Nov 2019, 14:50Is there a list anywhere of what values BBCSDL INKEY(-256) can return?
Yes, it's here. However that list is not entirely accurate in respect of the &53/&73 distinction because it states it's a function of the CPU (&53 for x86, &73 for ARM) when in fact it indicates whether the interpreter is coded in assembler (&53) or in C (&73). So a 64-bit x86 CPU will return &73 (and indeed a 32-bit x86 CPU may also return &73 if it happens to be running the C version).
Note that BBCSDL was v0.26 but is now v1.07 and MacOS was 10.10 but is now v10.15
Neither of those is the reason for the change, but rather that you were running the 32-bit assembler edition before and the 64-bit C edition now (MacOS no longer supports 32-bit apps so I discontinued and abandoned that edition of BBC BASIC).
Soruk
Posts: 23
Joined: Mon 30 Jul 2018, 20:24

Re: BBCSDL v1.07 INKEY(-256)

Post by Soruk »

RichardRussell wrote: Mon 25 Nov 2019, 16:49
mavison wrote: Mon 25 Nov 2019, 14:50Is there a list anywhere of what values BBCSDL INKEY(-256) can return?
Yes, it's here. However that list is not entirely accurate in respect of the &53/&73 distinction because it states it's a function of the CPU (&53 for x86, &73 for ARM) when in fact it indicates whether the interpreter is coded in assembler (&53) or in C (&73). So a 64-bit x86 CPU will return &73 (and indeed a 32-bit x86 CPU may also return &73 if it happens to be running the C version).
Wiki updated. :D