I attach here the basic program that loads the fles, patches them and finally starts REL (exec&H2602)
I include a DOS disk ("F1 - step4 with BOOT6 and L2BOOT and CCSWITCH.VDK")that can be loaded in XRoar in drive 2
and another disk ("F2 - step6 with OS9BOOT and folders.DSK") for drive1 that will be called when boot process succeeds.
Then RUN"2:CCSW52" will require a keypress and then it will STOP to give you time to set a breakpoint in GDB or any other debugger. Points of interest for debugging ...
- F013 the beginning of OS9P1
- F109 the code block that calculates present RAM
- F132 the exit after that calculations
- F5D8 the point where it loops while counter in stack is not zero
- F5CE point when low byte of counter is zero
- F5D3 the call to OS9 function Sleep
See a screen of the debugging session just before calling OS9 Function
In the lower GDB window you can see the contents of these addresses (groups of 16 bytes)
- $FF90, - $FFA0, - $FFF0 - $FEEE and - $0100
You see that $FFF0-FFFF have the values poked by the basic program, but the $FEEE range is not initialized and same for range $0100-$010F
No chance for the SWI2 to find the correct code
pere