Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!floyd!harpo!seismo!hao!hplabs!sri-unix!towson@amsaa From: towson%amsaa@sri-unix.UUCP Newsgroups: net.micro Subject: Re: LOAD = LOAD & RUN - (nf) Message-ID: <16917@sri-arpa.UUCP> Date: Fri, 24-Feb-84 08:56:35 EST Article-I.D.: sri-arpa.16917 Posted: Fri Feb 24 08:56:35 1984 Date-Received: Fri, 2-Mar-84 13:16:58 EST Lines: 25 From: David Towson (CSD)Ray - I know absolutely nothing about the c64, but I can tell you about a method of providing autostart that is used with the TRS-80, and can probably be used with the c64. After any command is executed and there is a return to the operating system command mode, what typically happens is that something will be written to the screen. Examples are: READY if you are in BASIC, and DOS READY if you are in DOS. In the TRS-80, the address of the screen-driver is kept in system-ram. That is, it is an alterable vector that is normally set at system initialization to point to a standard ROM routine, but which can be changed by the user if a custom screen-driver is installed. A character to be written to the screen is put into a processor register, and then a call is made to the screen-driver vector, which redirects the call to the actual driver. If during program load the start address of the program is substituted in the screen-driver vector for the address of the screen-driver, then when the load is complete and the OS tries to give you your prompt, the program just loaded gets called instead of the screen-driver, and presto, the program is off and running. Of course, the first things such a program must do are to clean-up the stack (because there's never going to be a return from that "call" to the "screen-driver"), and to restore a valid screen-driver address to the vector that was "borrowed" to accomplish the autostart. Neat, huh ? Dave towson@amsaa