;
; *** Listing 7-21 ***
;
; Measures the performance of multiplying by 80 with
; a table look-up.
;
	jmp	Skip
;
; Table of multiples of 80, covering the range 80 times 0
; to 80 times 479.
;
Times80Table	label	word
TIMES_80_SUM=0
	rept	480
	dw	TIMES_80_SUM
TIMES_80_SUM=TIMES_80_SUM+80
	endm
;
Skip:
	sub	ax,ax
	call	ZTimerOn
	rept	1000
	mov	ax,10	;so we have a constant value to
			; multiply by
	mov	bx,ax	;put the factor where we can use it
			; for a table look-up
	shl	bx,1	;times 2 for use as an index in a
			; word-sized look-up table
	mov	ax,[Times80Table+bx]
			;look up the answer
	endm
	call	ZTimerOff
