<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Wed, 17 Nov 2010 09:03:09 +0000 (GMT)
From   : info@... (Sprow)
Subject: Hints'n'Tips: Assembling non-ARM code on ARM BASIC

In article <20101117085338.w0is5svz4k8g4kkc@...>,
   J.G.Harston <jgh@...> wrote:
> Sprow wrote:
> >    J.G.Harston <jgh@...> wrote:
> >> Yes, the IF PAGE>&8000 is a quick'n'dirty way of deciding that you're
> >> running on ARM BASIC, but I haven't been able to work out a succinct
> >> better way of testing it.
> >
> >  DEFFNdetectBASIC5
> >  LOCAL temp
> >  ON ERROR =FALSE
> >  temp=BEAT
> >  =TRUE

> Which isn't a single line. My usual code is:

[snip ideas]

> Which generates an error, and so consequently isn't a single line.

Didn't know single line was a requirement. I did think of assembling NOP and
then looking at the opcode output

  P%=TOP:[NOP:]:IF?TOP=&EA THEN is6502 ELSE isARM

but that doesn't cope with the case of 6502 assembler patched into ARM BASIC,
Sprow.
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>