	.OPT NO LIST
;     Smoooth Scrolling With
;  Graphics Mode E and DLI intr.
;         by NIR DAREY
;
	*= $7500
DUMMY	NOP 
	LDA #$40
	STA 756
	LDA #DLINT&255
	STA 512 	;VDSLSTL
	LDA #DLINT/256
	STA 513 	;VDSLSTH
	LDA #$C0
	STA $D40E 	;enable DLI
	LDA #DLIST&255
	STA 560 	;DLISTL
	LDA #DLIST/256
	STA 561 	;DLISTH
	LDA #7
	LDY #VBLNK&255
	LDX #VBLNK/256
	JSR $E45C
	LDA L0001
	INC L0001
	STA STRDATLO
	LDA L0003
	STA STRDATHI
	LDA #$02
	LDX #$12
	LDY #$06
	STA $02C4
	STX $02C5
	STY $02C6
	LDA #$00
	STA $02C8
	LDA #1
	JSR $5700
	JMP PMSCROLL
VBLNK
	JSR $5703
	DEC DUMMY
	LDA DUMMY
	BMI L0007
	STA $D404 	;HSCROL
	JMP L0008
L0007	LDA #$07
	STA DUMMY
	STA $D404 	;HSCROL
	INC L0001
	BNE L0009
	INC L0003
L0009	LDA L0003
	CMP #ESCRL/256
	BNE L0008
	LDA L0001
	CMP #ESCRL&255
	BNE L0008
	LDA STRDATLO
	STA L0001
	LDA STRDATHI
	STA L0003
L0008	JMP $E462
;
DLINT
	PHA 
	LDA #$35
	STA $D40A
	STA $D012
	STA $D013
	STA $D014
	STA $D015
	LDA #$74
	STA $D016
	PLA 
	RTI 
;
;The Display List
;
DLIST
	.BYTE $70,$70
	.BYTE $4E,$50,$81
	.BYTE 14,14,14,14,14,14,14,14
	.BYTE 14,14,14,14,14,14,14,14
	.BYTE 14,14,14,14,14,14,14,14
	.BYTE 14,14,14,14,14,14,14,14
	.BYTE 14,14,14,14,14,14,14,14
	.BYTE 14,14,14,14,14,14,14,14
	.BYTE 14,14,14,14,14,14,14,14
	.BYTE 14,14,14,14,14,14,14,14
	.BYTE 14,14,14,14,14,14,14,14
	.BYTE 14,14,14,14,14,14,14,14
	.BYTE 14,14,14,14,14,14,14,14
	.BYTE 14,14,14,14,14
	.BYTE $4E,$00,$90
	.BYTE 14,14,14,14,14,14,14,14
	.BYTE 14,14,14,14,14,14,14,14
	.BYTE 14,14,14,14,14,14,14,14
	.BYTE 14,14,14,14,14,14,14,14
	.BYTE 14,14,14,14,14,14,14,14
	.BYTE 14,14,14,14,14,14,14,14
	.BYTE 14,14,14,14,14,14,14,14
	.BYTE 14,14,14,14,14,14,14,14
	.BYTE 14,14,14,14,14,14,14,14
	.BYTE 14,14,14,14,14,14,14,14
	.BYTE 14,14,14,14,14,14,14,14
	.BYTE 14,14,14,14
	.BYTE $80,$70,$57
L0001	.BYTE SCLTX&255
L0003	.BYTE SCLTX/256
	.BYTE $41
	.WORD DLIST
;
; The Scroll Text
SCLTX
	.SBYTE "                                      WELL, WHAT DO YOU THINK ABOUT THIS NICE DEMO, IS IT COOL! "
	.SBYTE "OR WHAT!?      I THINK THAT YOU PROBABLY ALLREADY RECODNIZED THE PICTURE,  YES IT'S ONE OF "
	.SBYTE "IRON MAIDEN CREATURES IS HE NICE OR WHAT?  WE HOPE THAT YOU ARE ENJOYING THIS DEMO, AND WE "
	.SBYTE "HOPE THAT WE WON'T GET YOU BORE WITH THIS LONG TEXT.                                          "
ESCRL
	.SBYTE "                                       "
STRDATLO	.BYTE 0
STRDATHI	.BYTE 0
	.INCLUDE #D:SCROLL.ASM
