BASIC V on RISC OS's SYS keyword allowed for direct calling of OS APIs. Simplistically it was a wrapper over the SWI mechanism, and conceptually therefore similar to Agon MOS's RST 8
Whilst you could use SWI numbers on RISC OS with the BASIC SYS keyword, it was more common to use a string, such as "Wimp_Poll". When used in this manner the BASIC interpreter would look up the SWI number via a call to OS_SWINumberFromString. This was a more user-friendly way to use SYS, making for much more readable/understandable code.
It'd be nice if the Agon BASIC V could support the string-based version of SYS, therefore we'd need an equivalent of OS_SWINumberFromString. It may also be nice to have OS_SWINumberToString as well.
Simplistically this is just a lookup table... If/when we implement MOS Modules #2 for modules that add in new API calls we'd likely want to allow those to include their own lookup tables
RISC OS documentation for this functionality can be found here:
https://www.riscosopen.org/wiki/documentation/show/OS_SWINumberFromString
https://www.riscosopen.org/wiki/documentation/show/OS_SWINumberToString
http://www.riscos.com/support/developers/bbcbasic/part3/keywords.html#sys
BASIC V on RISC OS's
SYSkeyword allowed for direct calling of OS APIs. Simplistically it was a wrapper over the SWI mechanism, and conceptually therefore similar to Agon MOS'sRST 8Whilst you could use SWI numbers on RISC OS with the BASIC
SYSkeyword, it was more common to use a string, such as"Wimp_Poll". When used in this manner the BASIC interpreter would look up the SWI number via a call toOS_SWINumberFromString. This was a more user-friendly way to useSYS, making for much more readable/understandable code.It'd be nice if the Agon BASIC V could support the string-based version of
SYS, therefore we'd need an equivalent ofOS_SWINumberFromString. It may also be nice to haveOS_SWINumberToStringas well.Simplistically this is just a lookup table... If/when we implement MOS Modules #2 for modules that add in new API calls we'd likely want to allow those to include their own lookup tables
RISC OS documentation for this functionality can be found here:
https://www.riscosopen.org/wiki/documentation/show/OS_SWINumberFromString
https://www.riscosopen.org/wiki/documentation/show/OS_SWINumberToString
http://www.riscos.com/support/developers/bbcbasic/part3/keywords.html#sys