[Coco] CoCo3 and 16K cart roms.....

William Astle lost at l-w.ca
Mon Apr 11 16:45:04 EDT 2016


On 2016-04-11 14:39, Tormod Volden wrote:
> On Mon, Apr 11, 2016 at 5:32 PM, William Astle wrote:
>>          DEC ROMTEST
>> ROMTEST BRN RAMMODE
>>          JMP ROUTINE
>> RAMMODE INC ROMTEST
>>          ; set up ROM mode with book keeping as needed
>>          JSR ROUTINE
>>          ; restore RAM mode with book keeping as needed
>>          RTS
>
>> It has the disadvantage that the stack will be arranged differently
>> depending on whether you were vectoring in via ROM or RAM mode but if you
>> aren't relying on stack contents for parameters, that won't be a problem.
>
> Wouldn't that be solved simply by replacing "JMP" with "JSR" followed
> by "RTS" in the ROM mode path? Well, as long as the book keeping is
> not changing the stack. Otherwise one would need to adjust the stack
> in the ROM mode path accordingly.

It would, generally, yes. But if your routines don't need the stack to 
be arranges in any particular way, one might as well leave it with the JMP.



More information about the Coco mailing list