DEMO_MAIN			PSHS	A,B,X,Y,U,CC
					ORCC	#$40	; Mask FIRQ

					LBSR	INSTALL_MUSIC_IN_URARAM

					LDX		#MUSIC_DATA_IN_URARAM
					STX		PSGPLAY_DATAPTR,PCR

					LBSR	PSGPLAY_SET_IRQ_HOOK
					LBSR	PSGPLAY_START

					LBSR	DEMO_TITLE
					LBSR	SPRITEDEMO

					LBSR	INSTALL_LINEDDA_IN_SUBCPU
					LBSR	INSTALL_CLEAR_BITPLANE_IN_SUBCPU
					LBSR	INSTALL_VERTICAL_CLEAR_IN_SUBCPU

					LBSR	CLEAR_SCREEN

					LDD		#BGM_FIRST_THEME_MID
					STD		SPRINGDEMO_MUSICSTOP,PCR
					LBSR	SPRINGDEMO
					LDA		$FD04
					BITA	#2
					BEQ		DEMO_EXIT

					LBSR	CLEAR_SCREEN

					LDD		#BGM_FIRST_THEME_END
					STD		BALLDEMO_BGMSTOP,PCR
					LBSR	BALLDEMO
					LDA		$FD04
					BITA	#2
					BEQ		DEMO_EXIT

					LBSR	SPRITEDEMO



					LDA		$FD04
					BITA	#2
					BEQ		DEMO_EXIT



					LBSR	MAZE_DEMO



					LDA		$FD04
					BITA	#2
					BEQ		DEMO_EXIT


					LBSR	SPINDEMO
					LDA		$FD04
					BITA	#2
					BEQ		DEMO_EXIT

					LBSR	SPRITEDEMO
					LDA		$FD04
					BITA	#2
					BEQ		DEMO_EXIT


					LBSR	AIRPLANE_DEMO
					LDA		$FD04
					BITA	#2
					BEQ		DEMO_EXIT


					COM		BALLDEMO_DONTINIT,PCR
					LDD		#BGM_LAST_PHRASE
					STD		BALLDEMO_BGMSTOP,PCR
					LBSR	BALLDEMO



DEMO_EXIT
					LBSR	RESET_PALETTE
					LBSR	END_TITLE
					LBSR	PSGPLAY_REVERT_IRQ_HOOK
					LBSR	PSGPLAY_INITPSG

					; LBSR	CLEAR_SCREEN
					PULS	A,B,X,Y,U,CC,PC



