[Coco] Creating and loading big machine code files into RSDOS

Glen Hewlett glen.hewlett at sympatico.ca
Tue Feb 14 20:46:48 EST 2017


Hi William,

I’ve starting implementing your Two Stage loader and I just thought I’d let you know that in Stage One it might be a good idea to put the memory page for $FFA2 back to normal before the program exits and moves on to Stage Two

I changed the code from:
LOADER3 JSR     $A42D   ; close file to be polite
        ORCC    #$50    ; disable interrupts to prevent crash

To:
LOADER3 JSR     $A42D   ; close file to be polite
        LDA     #$3A    ; Put BLK 2 back to default
        STA     $FFA2   ; page of $3A
        ORCC    #$50    ; disable interrupts to prevent crash

Cheers,
Glen


> On Feb 13, 2017, at 9:44 PM, William Astle <lost at l-w.ca> wrote:
> 
> You really do want to avoid loading over Extended Basic. Depending how far over it you go, it will crash. If you're careful, you can get away with a small amount of overlap but it gets fiddly doing that.
> 
> I did write a "paper" on loaders some years back which might be of use if you go that route. You can find it on my web site in the "Coco" section under "Projects". For ease in finding it, here's a direct link to the relevant page:
> 
> http://lost.l-w.ca/0x05/projects/coco-stuff/
> 
> In the PDF, there's an auto-executing example that loads any number of blocks of data from the same file as the main program which would mean you could have everything in a single file. There's also an example of how to do a two stage load that allows you to overwrite anything though that can get complicated.
> 
> On 2017-02-13 03:48 PM, Glen Hewlett wrote:
>> Hi All,
>> 
>> I’m currently using lwtools to assemble my transcoded z80 pacman to the 6809 and I’m getting close to the $E00-$7FFF range and I was wondering what are my options once my source code starts to go over the $8000 point and will start loading over Extended Color Basic and it will then fail loading won’t it?
>> 
>> Is there an easy way that doesn’t require me to make my own disk loader program?  It would be amazing if such a feature was built in to lwasm.
>> 
>> Currently I’m using Basic to load the ROMs and the character and sprite data in blocks of $2000 and moving them to other blocks of memory not needed during execution.  Then it loads the main program but when my code gets too big this is going to be a problem.
>> 
>> If I do have to use a special loading program is there one that already exists that I can use for such a job?
>> 
>> Thanks,
>> Glen
>> 
> 
> 
> -- 
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco



More information about the Coco mailing list