[Coco] NitrOS9 and 6309 code
Gene Heskett
gheskett at shentel.net
Sat Jun 1 12:29:37 EDT 2019
On Saturday 01 June 2019 08:09:08 am Robert Gault wrote:
> Gene,
>
> The following should work as I believe the 6809 just ignores "illegal"
> opcode.
>
> ldb #123
> clrd
> tstb
> beq 6309 code
> 6809 code
>
> CLRD looks like a CLRA to a 6809 as it skips over the $10 in $10,$4F.
>
I hadn't been made aware of that, thank you Robert.
> Robert
>
That certainly looks like it should work then. And its certainly simple.
So we have an empty byte at all in the dp? We could stb, dp address,
then tst ,dp address later to see if we even bother to cmpd against the
ty nibble of the code we're contemplating forking or chaining to. 18
bytes if its done right, only once in the 6809 code. Make it a sub
called from both f$fork and f$chain.
That would raise the stack by 2 bytes, needing an leas, 2,s to clean it
up when we skip the return in favor of reporting the error. Since the
vfy src code is "out there", it might be a good idea to use that test to
prevent its changing of a modules ty to obj6309 if its running on a
6809. It would at least be a small attempt to prevent the user from
taking aim at his foot. Let the error code serve as the educational
message, helping the new bees to understand better that there is a
difference.
This thread is also educational to me as its served to remind me of the
extremely low usage uptake of a utility I wrote to greatly simplify such
code manipulation in the first place since our assembler at the time
wasn't 6309 aware... I an recall looking it up and putting it into the
code as data statements.
Because ident is(was?) broken of a 6309, I thought vfy's uptake would be
much higher than it apparently is. I'd even go so far as to say its
disappointing to me. Or has someone fixed ident? Whats on my hd's would
be ancient by now.
Thanks Robert.
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
More information about the Coco
mailing list