summaryrefslogtreecommitdiff
path: root/frontends/calculator/CEdev/lib/shared/isprint.src
blob: ed19c412eeca6de063c8e80e1d52ed6d5674be88 (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	_isprint
	.ref	___maptab
	.assume adl=1

; original source
; int isprint(int c) {
; 	if( (unsigned char)c & (unsigned char)0x80 )
;		return (0);
;	return(__maptab[c] & (unsigned char)(UC|LC|DIG|PUN|SP));
; }

_isprint:
	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,47
	sbc	hl,hl
	ld	l,a
	ret