
;------------------------------------------------------------------------------
;			       MULTIPLY_BY_THREE
;------------------------------------------------------------------------------
; DESCRIPTION:	This routine multiplies the accumulator by three, using a table
;		lookup technique.  (This is intended only to demonstrate the
;		table lookup technique; there are lots better ways to multiply
;		by three!)
;------------------------------------------------------------------------------

TIMES_3_TABLE:	DB	0, 3, 6, 9, 12, 15

MULTIPLY_BY_THREE:
		MOV	DPTR,#TIMES_3_TABLE	; Point DPTR at lookup table
		MOVC	A,@A+DPTR		; Grab the value indexed by A
		RET				; Done
