summaryrefslogtreecommitdiff
path: root/frontends/calculator/CEdev/lib/shared/isalnum.src
blob: 7c383508fc8654df803213a9bcee4c8b995f1336 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
	.def	_isalnum
	.ref	___maptab
	.assume adl=1
	
; original source
; int isalnum(int c) {
; 	if( (unsigned char)c & (unsigned char)0x80 )
;		return (0);
;	return(__maptab[c] & (unsigned char)(UC|LC|DIG));
; }

_isalnum:
	pop	hl
	pop	de
	push	de
	push	hl
	or	a,a
	sbc	hl,hl
	bit	7,e
	ret	nz
	ex	de,hl
	ld	de,___maptab
	add	hl,de
	ld	a,(hl)
	and	a,13
	sbc	hl,hl
	ld	l,a
	ret