Jabberwocky Example



	TITLE	Colorful

	INCLUDE Irvine32.inc

	.data

message1 BYTE	"`Twas brillig, and the slithy toves", 13, 10, \  ; continue line
		"Did gyre and gimble in the wabe;", 13, 10, \
		"All mimsy were the borogoves,", 13, 10,  \
		"And the mome raths outgrabe.", 13, 10, 10, 0  ; note extra linefeed

message2 BYTE	"Beware the Jabberwock, my son!", 13, 10, \
		"The jaws that bite, the claws that catch!", 13, 10, \
		"Beware the Jubjub bird, and shun", 13, 10, \
		"The frumious Bandersnatch!", 13, 10, 10, \    ; here too

		"He took his vorpal sword in hand:", 13, 10, \
		"Long time the manxome foe he sought --", 13, 10, \
		"So rested he by the Tumtum tree,", 13, 10, \
		"And stood awhile in thought.", 13, 10, 10, 0  ; almost too long

message3 BYTE	"And, as in uffish thought he stood,", 13, 10, \
		"The Jabberwock, with eyes of flame,", 13, 10, \
		"Came whiffling through the tulgey wood,", 13, 10, \
		"And burbled as it came!", 13, 10, 10, \

		"One, two! One two! And through and through", 13, 10, \
		"The vorpal blade went snicker-snack!", 13, 10, \
		"He left it dead, and with its head", 13, 10, \
		"He went galumphing back.", 13, 10, 10, 0       ; almost too long

message4 BYTE	"And, has thou slain the Jabberwock?", 13, 10, \
		"Come to my arms, my beamish boy!", 13, 10, \
		"O frabjous day! Callooh! Callay!", 13, 10, \
		"He chortled in his joy.", 13, 10, 10, 0

	.code

main	PROC

        call	CrLf
        call	Crlf
 	mov	esi, 0
 	mov	ecx, LENGTHOF message1 - 1
lp1:	mov	eax, 15
	call	RandomRange
	inc	eax
	call	SetTextColor
	mov	al, message1[esi]
	call	WriteChar
	inc	esi
	loop	lp1

 	mov	esi, 0
 	mov	ecx, LENGTHOF message2 - 1
lp2:	mov	eax, 15
	call	RandomRange
	inc	eax
	call	SetTextColor
	mov	al, message2[esi]
	call	WriteChar
	inc	esi
	loop	lp2

 	mov	esi, 0
 	mov	ecx, LENGTHOF message3 - 1
lp3:	mov	eax, 15
	call	RandomRange
	inc	eax
	call	SetTextColor
	mov	al, message3[esi]
	call	WriteChar
	inc	esi
	loop	lp3

 	mov	esi, 0
 	mov	ecx, LENGTHOF message4 - 1
lp4:	mov	eax, 15
	call	RandomRange
	inc	eax
	call	SetTextColor
	mov	al, message4[esi]
	call	WriteChar
	inc	esi
	loop	lp4

 	mov	esi, 0
 	mov	ecx, LENGTHOF message1 - 1
lp5:	mov	eax, 15
	call	RandomRange
	inc	eax
	call	SetTextColor
	mov	al, message1[esi]
	call	WriteChar
	inc	esi
	loop	lp5

	mov	eax, 15
	call	SetTextColor
	exit

main	ENDP

	END	main