include	clib.inc
include	conio.inc
include	dos.inc
include	fblk.inc

	public	fbcolor

_TEXT	SEGMENT

fbcolor proc dist
	.if ax & _A_SELECTED
            mov al,at_foreground[F_Panel]
        .elseif ax & _A_HIDDEN
            mov al,at_foreground[F_Hidden]
        .elseif ax & _A_SYSTEM or _A_UPDIR
            mov al,at_foreground[F_System]
        .elseif ax & _A_SUBDIR
            mov al,at_foreground[F_Subdir]
        .else
	    mov al,at_foreground[F_Files]
        .endif
	or al,at_background[B_Desktop]
	ret
fbcolor endp

_TEXT	ENDS

	END
