Rem TEE.ASI v1.0a compiled with ASIC v5.00
Rem Program: Redirects piped input to the screen and standard out
Rem Example: DIR | SORT | TEE > DIRLIST.DAT

START:
AX=&hex0B00
INT86(&hex21,AX,BX,CX,DX,NA,NA,NA,NA,NA)
Status=AX MOD &hexFF00
IF Status=&hexFF THEN
  AX=&hex0700
  INT86(&hex21,AX,BX,CX,DX,NA,NA,NA,NA,NA)
  Char=AX MOD &hexFF00
  IF Char=13 THEN
  ELSE
    IF Char=10 THEN
      PRINT ""
    ELSE
      C$=CHR$(Char)
      PRINT C$;
    ENDIF
  ENDIF
  AX=&hex0200
  DX=Char
  INT86(&hex21,AX,BX,CX,DX,NA,NA,NA,NA,NA)
  GOTO START:
ENDIF
END
