#define end .end
#define org .org
#define equ .equ

cls      equ  01C9h			; Clear screen routine

      	org    8000h		; Assemble at 8000h

; INITIALISE
			LD A,00h
			LD (7818h),A		; Change to white on black text
			CALL cls				; Clear the screen

start 	LD BC,mesg			; BC contains start of message location
loop		LD A,(BC)			; stick the letter at BC into A
			OR A
			JR Z,start			; If we are at the end, restart.
			SET 6,A				; Make sure letters and other characters are same
			LD (disp+31),a		; Put a letter on the screen
			PUSH BC
			CALL pause			; slow the thing down!
			LD DE,disp
			LD HL,disp+1
			LD BC,1Fh			; move the line back one space
			LDIR
			POP BC
			INC BC
			JP loop				; continue till all message printed

pause 	LD BC,(delay)		; Delay to slow scrolly down
			CALL 0060h
			RET

delay 	.WORD 20A0h			; How much to delay by

; The message to display
mesg		.TEXT "WELCOME TO THE VZ300 SCROLLING MESSAGE DISPLAYER ... AIN'T THIS A REALLY COOL PROGRAM?"
			.TEXT "       GLAD YOU COULD JOIN US.  WELP, THIS IS JASON OAKLEY SETTING UP A NICE LITTLE ASSEMBLY"
			.TEXT " PROGRAM ON THE FIRST OF JANUARY IN THE YEAR 2000.  MY FIRST REAL BIG PROGRAM. (WELL IT'S NOT *THAT* BIG "
			.TEXT "A PROGRAM.. BUT IT'S THE FIRST I'VE REALLY TRIED =:)                    "
			.BYTE 00h			; End the message with a 00h byte

disp		.EQU 7000h+01E0h	; Position to do the scrolly

end


