[Coco] NitrOS9 and 6309 code

Robert Gault robert.gault at att.net
Fri May 31 21:29:30 EDT 2019


Allen and Gene,

Here is more of the code.

          cmpa   #Prgrm+Objct regular module?
          beq    L04FB       yes, go
          cmpa   #Systm+Objct system module?
          beq    L04FB
          IFNE   H6309
*--- these lines added to allow 6309 native mode modules to be executed
          cmpa   #Prgrm+Obj6309 regular module?
          beq    L04FB       yes, go
          cmpa   #Systm+Obj6309 system module?
          beq    L04FB
*---
          ENDC
          ldb    #E$NEMod    return unknown module

So if H6309=0 there is no 6309CPU and the second set of lines are not there in fchain. That means 
that Objct will not be found by fchain if a module has a Obj6309 and the test falls down to "return 
unknown module".
Likewise in a 6309 system, fchain will look for both Objct and Obj6309 so will accept either.

At the moment, it looks like every .asm which uses 6309 code will need a new lg value. I just 
noticed one module rbf.asm which contains:

          IFNE  H6309
lg       set   Obj6309
          ELSE
lg       set   Objct
          ENDC

That's similar to what I suggested previously but I'd hate to have to look at every .asm file to 
make this type of correction.

Robert

> On May 31, 2019, at 6:44 PM, Gene Heskett <gheskett at shentel.net> wrote:
>>
>> Scratching thinning hair. Since both branches goto the same place, the
>> real question is whats next after the 2nd failed beq?  Thats the
>> interesting bit here.
>
> And is that different for 6809 kernel? A 6309 kernel should be able to run both, but a 6809 should fail on 6309 code.
>


More information about the Coco mailing list