<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Sat, 20 Nov 2010 18:57:56 +0000
From   : jgh@... (J.G.Harston)
Subject: Hints'n'Tips: Assembling non-ARM code on ARM BASIC

Rick Murray wrote:
>> No, BASIC, on all platforms, interprets a CALL or USR to&FFxx as a
>> call to a BBC-MOS-style MOS function.
>> See http://beebwiki.jonripley.com/USR#BBC_MOS_API_Access

> - does BASIC (under RISC OS) *always* assume &FFFx (as applicable) is
> for the BBC OSxxxx calls?

BASIC under *any* platform[1] assumes that calls to &FFxx (or &FFC0-&FFFF)
are calls to the BBC MOS.
See http://beebwiki.jonripley.com/USR#BBC_MOS_API_Access

[1]Exceptions are where it is difficult or beyond the programmer's ability
to do the translation. BBC BASIC (86) on the Master 512 does the full set,
but BBC BASIC (86) on other platforms only do &FFE0-&FFFF.
BBC BASIC (68) on the Apple Mac and ARM BASIC VI compiled with the BBCOS
option turned off do none of them; and some builds of BBC BASIC Z80 don't
do any, or only do OSWORD &0A and OSBYTE &87. These exceptions are found
by the ProgEnv library if you really need to write code that will run on
such a wide range of platforms. In general, "&FFxx calls the BBC MOS API"
works on a sufficiently large domain of "everything" for it to always
be applicable.

-- 
J.G.Harston - jgh@...     
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>