home *** CD-ROM | disk | FTP | other *** search
- /* asiputc.c
- *
- * The Greenleaf Comm Library
- *
- * Copyright (C) 1985-1990 Greenleaf Software Inc. All Rights Reserved.
- *
- * int asiputc( port, character)
- * int port; - Port 0..MAX_PORT
- * int character; - Char to send 00..FF
- *
- * DESCRIPTION
- * this function transmits a character via "interrupt" mode.
- *
- * SIDE EFFECTS
- * none
- *
- * RETURNS
- *
- * Value Meaning
- * ------ -------
- * ASSUCCESS Successful (No error(s))
- * ASINVPORT Requested port is out of range
- * ASNOTSETUP Requested port not setup with asifirst()
- * ASBUFRFULL Requested port's buffer is full
- *
- * MODIFICATIONS
- * 10-29-85 ""
- * Modified for release 2.0
- *
- * 23-FEB-1987 08:51:11.24
- * Removed call to _aschkcnl(), put code inline for speed
- */
- #include <stdio.h>
- #include "gf.h"
- #include "asiports.h"
-
- int GF_CONV asiputc( port,c )
- int port,c;
- {
- struct PORT_TABLE *p;
-
- if(port<0 || port>=MAX_PORT)
- return(_aserror= ASINVPORT);
- if(as_chnl==NULL || (p=as_chnl->tblport[port].ptb)==NULL)
- return(_aserror= ASNOTSETUP);
- _aserror = ASSUCCESS;
- if(p->chst_bits.txfull==1)
- return(ASBUFRFULL);
- return(_asiputc(p,c));
- }
-
-