	.include "os9.d"

	.text

	.global	__isatty
	; int __isatty(int pathno)
__isatty:
	leas	-32,s
	tfr	b,a
	clrb				; SS.OPT
	leax	,s
	os9	I$GetStt		; read the path's options section
	lda	,s
	leas	32,s
	bcs	.1
	bne	.1
	clra				; device type 0 is SCF (terminal)
	ldb	#1
	rts
.1:	clra
	clrb
	rts
