Index

Function Name: INDSTA

Purpose: STA (stavec),Y to any bank
Call address: $FF77 (hex) 65399 (decimal)
Preparation:

	Registers:	.A = data
			.X = bank (0-15)
			.Y = index
	Memory:		setup indirect vector
			setup STAVEC ($2B9) pointer
	Flags:		none
	Calls:		none
Results:
	Registers:	.X used
	Memory:		changed per call
	Flags:		status invalid

Description: INDSTA enables applications to write data to any other bank. After you set up STAVEC ($2B9), it calls GETCFG to convert the bank number and JMPs to code in common (shared) RAM at $2AF which switches banks, stores the data, restores your bank, and returns. When calling a nonsystem bank, the user should take necessary precautions to ensure that interrupts (IRQ's and NMI's) will be handled properly (or disabled beforehand).

EXAMPLE:

	LDA	#$00	;setup write to $2000
	STA	$FA
	LDA	#$20
	STA	$FB
	LDA	#$FA
	STA	$2B9
	LDA	data
	LDX	#$01	;in bank 1
	LDY	#$00
	JSR	$FF77	;STA ($FA,RAM 1),Y