[net.micro.cbm] Changing warmstart vectors

@RUTGERS.ARPA:LAVITSKY@RU-BLUE.ARPA (03/12/85)

From: Eric <LAVITSKY@RU-BLUE.ARPA>

Hi,

 I want to modify the NMI vectors (?) so that a run-stop/restore will restart
my program. The program is a terminal program, so it needs the RS232 NMI
handling. How do I modify the vectors (and which ones) so that a run-sto/
restore will do what I want without interfering with normal RS232 NMI stuff?
Can I just do:

	sei
	lda	#lowaddr
	sta	$0318
	lda	#hiaddr
	sta	$0319
	cli

or am I missing something??? (do I need to write my own NMI handler??)

Thanx,
Eric
-------

doug@terak.UUCP (Doug Pardee) (03/15/85)

>  I want to modify the NMI vectors (?) so that a run-stop/restore will restart
> my program. The program is a terminal program, so it needs the RS232 NMI
> handling. How do I modify the vectors (and which ones) so that a run-sto/
> restore will do what I want without interfering with normal RS232 NMI stuff?

I can't tell you offhand the exact info, but you don't want to play
around with page zero, because there's another place just for what
you want to do.

I don't remember the address just now -- it's $A000 or something like
that.  It's used by BASIC and by cartridges for exactly the same purpose
that you have.  As I recall, you have to page out the BASIC ROM so that
you have the RAM in its place, then you put a pointer in that location
which points into your program.  At that part of your program there
has to be a 7-byte (is that right?) sequence, including "CBM" or 
something similar in PetAscii.  Check in the Programmer's Reference,
I'm pretty sure it's in there.
-- 
Doug Pardee -- Terak Corp. -- !{hao,ihnp4,decvax}!noao!terak!doug