;
; *** Listing 10-8 ***
;
; Initializes a 1000-word array using a single
; repeated STOSW.
;
	jmp	Skip
;
ARRAY_LENGTH	equ	1000
WordArray	dw	ARRAY_LENGTH dup (?)
;
Skip:
	call	ZTimerOn
	mov	di,seg WordArray
	mov	es,di
	mov	di,offset WordArray
			;point ES:DI to the array to
			; fill, since STOSW must
			; use that segment:offset combo
			; as a memory pointer
	sub	ax,ax	;we'll fill with the value zero
	mov	cx,ARRAY_LENGTH ;# of words to fill
	cld		;make STOSW add 2 to DI after each
			; execution
	rep	stosw	;fill the array
	call	ZTimerOff
