	title	Module from library BASE_2 : JMPTAB
	name	('JMPTAB')
	maclib	baselib.lib

; Do jump through table via character

; Copyright (C)	Werner Cirsovius
;		Hohe Weide 44
;		D-20253 Hamburg
;		Tel.: +49-40-4223247

;		Version 2.0 November 1986

; ENTRY	Accu holds character to be searched for
;	Call must follow table pointer with:
;	Byte 0 : Number of characters in table
;	Byte 1 : First character
;	    ....
;	Byte n : Last character
;	Word 0 : Address corresponding to last character
;	    ....
;	Word n : Address corresponding to first character

; EXIT	Jump to routine found in table
;	or exit immediately after call

	entry	jmptab

	extrn	@caljp

jmptab:
	ex	(sp),hl		; Get caller's PC
	call	@caljp		; Get from table
	ex	(sp),hl		; Set new PC
	ret			; Exit

	end

