[Coco] NitrOS9 and 6309 code
Jeff Teunissen
deek at d2dc.net
Sun Jun 2 04:51:59 EDT 2019
On Sat, Jun 1, 2019 at 10:11 PM Robert Gault <robert.gault at att.net> wrote:
[snip]
> With a very cursory examination, it looks like L1413 and L14A3 are the locations to patch with
> checks for Obj6309 so:
>
> L1413 cmpa #$11
> beq L1413b
> cmpa #$17
> lbne L14D7
> L1413b leax >u00E3,u
>
> L14A3 cmpa #Prgrm+Objct
> lbeq L15D7
> cmpa #Prgrm+Obj6309
> lbeq L15D7
> cmpa #Data
Looks like that wasn't enough, but I did seem to fix it (at least on
my 6309 machine). I had to do a little funny business with the module
linking/loading as well, or the error 234 continued. The full diff
looks like:
--- a/level1/cmds/shellplus.asm
+++ b/level1/cmds/shellplus.asm
@@ -2873,14 +2873,19 @@ L13EF leax >u00E3,u
L1400 leax >u00E3,u
stx <u0004
rts
-L1407 cmpa #$51
- bne L1413
- bsr L13EF
- lbcs L162B
- bra L1427
-L1413 cmpa #$11
- lbne L14D7
- leax >u00E3,u
+
+L1407 cmpa #ShellSub+Objct Is it a shellsub mod?
+ bne L1413 No, check for other types
+ bsr L13EF link/load shellsub file
+ lbcs L162B Error loading, bail out
+ bra L1427 Call the module
+L1413 cmpa #Prgrm+Objct How about a program executable?
+ IFNE H6309
+ beq L1413a Yes, it's a binary
+ cmpa #Prgrm+Obj6309 What about a 6309 binary?
+ ENDC
+ lbne L14D7 No, not an executable
+L1413a leax >u00E3,u
stx <u0010
lbra L15D7
L1422 lbsr L08CB
@@ -2975,6 +2980,10 @@ L1473 clra Wildcard NMLink
* Not Shell or Shellsub module
L14A3 cmpa #Prgrm+Objct ML program?
lbeq L15D7 Yes, skip ahead
+ IFNE H6309
+ cmpa #Prgrm+Obj6309 6309 program?
+ lbeq L15D7 Yes, skip ahead
+ ENDC
cmpa #Data Is it a data module?
bne L14D7 No, skip ahead
inc <u0060 Set flag - data module
@@ -3122,6 +3131,7 @@ L15BE ldx <u0008 Get ptr to start
of current group
L15D5 stx <u0004 Save ptr to module name to fork
L15D7 ldx <u0004 Get ptr to module name to fork
lda #Prgrm+Objct
+L15D7a
IFGT Level-1
os9 F$NMLink Get memory requirement stuff from it
ELSE
@@ -3139,7 +3149,18 @@ L15D7 ldx <u0004 Get ptr to module
name to fork
tfr u,y
puls u
ENDC
+
+ IFNE H6309
+ bcc L15E5 Got it, continue
+L15d7r cmpa #Prgrm+Obj6309 Have we already tried 6309?
+ beq L162B Yes, give up
+
+ ldx <u0004 Set up the final run through
+ lda #Prgrm+Obj6309
+ bra L15D7a Now go back and try once more
+ ELSE
bcs L162B Still couldn't get, can't fork
+ ENDC
L15E5
IFEQ Level-1
ldy M$Mem,y
I might have missed something, but it seems to work now here.
More information about the Coco
mailing list