<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Fri, 19 Nov 2010 02:23:12 +0000
From   : jgh@... (J.G.Harston)
Subject: Hints'n'Tips: Assembling non-ARM code on ARM BASIC

Rick Murray wrote:
> J.G.Harston wrote:
>> A%=0:X%=1:X%=USR((&FFF4)AND&FF00)DIV256 as used in FNOS_GetEnv in
>                    ^^^^^
> I don't have the BASIC source to hand, but I was under the impression
> that the BBCEconet module added this functionality for compatibility
> reasons.

Errr... no.... OSBYTE 0 is Identify Host Machine. Nothing to do with
Econet.

> I ought to dig up the source just to see how this is handled. I kinda
> wonder what would happen if you were unlucky enough to assemble a branch
> at &FFFx - would BASIC jump into your code, or OS_WhatEver ?

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.

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