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

; Get hex byte from ASCII stream

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

;		Version 1.0 February 1987

; ENTRY	Reg pair <HL> points to ASCII buffer
;	Reg pair <DE> points to hex buffer

; EXIT	Hex buffer filled with byte
;	Buffers updated

	entry	hexbyt

	extrn	hexnib

hexbyt:
	push	bc
	call	hexnib		; Get a nibble
	add	a,a		; .. into hi bits
	add	a,a
	add	a,a
	add	a,a
	ld	b,a
	call	hexnib		; And 2nd nible
	or	b		; Put together
	ld	(de),a		; Save
	inc	de
	pop	bc
	ret

	end

