[Coco] Autostart binary
flexser at fiu.edu
Tue May 3 02:56:33 EDT 2016
The simplest way to do it is not overwriting the stack, but rather
overwriting one of Basic's vectors. See the Color Basic Unravelled book
(posted online) with its disassembly of Color Basic that shows where they
are located, which is mainly addresses around $160 to $180 or thereabouts.
These addresses get called by some elementary Basic functions like
character out or file close, and are three bytes starting with a JMP
opcode. So you put a segment in the file that you want to autostart that
overwrites this JMP with one to the preferred address within your program.
So when Basic gets done loading your file and attempts to output OK or
close the file, you are off and running.
On Tue, May 3, 2016 at 1:34 AM, Lee Patterson <lee at 8bitcoder.com> wrote:
> Can someone point me towards some docs that would help explain how to make
> an autostart binary? My guess is that I would purposely be overwriting some
> of BASIC's stack to make it think it should return to my programs starting
> Coco mailing list
> Coco at maltedmedia.com
More information about the Coco