Source file: /~heha/hs/kcemu/kcswberg.zip/DISK/GLOBBING.ASM

GLOBBINGASM;
OS	EQU	0F003H
	DB	7FH,7FH
	DB	'GLOBBING'
	DB	1
	CALL	OS
	DB	17H
	push	de
	call	os
	db	17h
	pop	hl
	call	glob
	jr	c,nomatch
	call	os
	db	23h,'matching',0
	jr	retu
nomatch
	call	os
	db	23h,'No Match',0
retu
	call	os
	db	2ch
	RET
;
glob0	inc	hl
glob0e	inc	de
glob	ld	a,(de)
	or	m
	ret	z
	ld	a,(de)
	cp	'*'
	jr	z,glob0s
	cp	1
	ret	c
	ld	a,m
	cp	1
	ret	c
	ld	a,(de)
	cp	'?'
	jr	z,glob0
	cp	m
	jr	z,glob0
	scf
	ret
glob0s
	push	hl
	push	de
	call	glob0e
	pop	de
	pop	hl
	ret	nc
	ld	a,m
	inc	hl
	or	a
	jr	nz,glob0s
	scf
	ret
V
GLOB0S:=
GLOB:<
GLOB0E:;
GLOB0:6
RETU:)
NOMATCH:ð
OS:l
	ret	nc
	ld	a,m
	inc	hl
	or	a
	jr	nz,glob0s
	scf
	ret
V
GLOB0S:=
GLOB:<
GLOB0E:;
GLOB0:6
RETU:)
NOMATCH:ð
OS:
Detected encoding: ANSI (CP1252)4
Wrong umlauts? - Assume file is ANSI (CP1252) encoded