Date : Sat, 20 Nov 2010 05:21:21 +0100
From : rick@... (Rick Murray)
Subject: Hints'n'Tips: Assembling non-ARM code on ARM BASIC
On 19/11/2010 03:23, J.G.Harston wrote:
> Errr... no.... OSBYTE 0 is Identify Host Machine. Nothing to do with
> Econet.
I was talking about the &FFF4 trap. Something told me it was the
BBCEconet module, but that's probably a faulty memory - as it would be
more logical that BASIC handle this itself, and use BBCEconet to convert
old-style RXCBs(etc) into RISC OS forms, and back again.
> 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
>
> Yes, if you're executing ARM code and the ARM code decides to do
> B&FFF4, yes the ARM will branch to&FFF4, but we're not talking
> about ARM code here, but BASIC code.
Okay, I could have worded it better... ;-)
P% = &FFF1
[ OPT 3
.bleugh
SWI "OS_WriteS"
EQUZ "This is a test..."
MOV PC, R14
]
CALL &FFF1
I take it BASIC V would trap this address, attempt to call the relevant
OS routines, and stuff would generally go "bang!"? That was my question
- does BASIC (under RISC OS) *always* assume &FFFx (as applicable) is
for the BBC OSxxxx calls?
Best wishes,
Rick.
--
Rick Murray, eeePC901 & ADSL WiFI'd into it, all ETLAs!
BBC B: DNFS, 2 x 5.25" floppies, EPROM prog, Acorn TTX
E01S FileStore, A3000/A5000/RiscPC/various PCs/blahblah...