Annotation of coherent/d/286_KERNEL/USRSRC/io/console.c, revision 1.1.1.1

1.1       root        1: /* $Header: /usr/src/sys/i8086/drv/RCS/console.c,v 2.1 88/09/03 13:03:39 src Exp $ */
                      2: /*
                      3:  * Tiny console driver.
                      4:  * 8086/8088 Coherent, IBM PC.
                      5:  *
                      6:  * $Log:       /usr/src/sys/i8086/drv/RCS/console.c,v $
                      7:  * Revision 2.1        88/09/03  13:03:39      src
                      8:  * *** empty log message ***
                      9:  * 
                     10:  * Revision 1.1        88/03/24  17:04:25      src
                     11:  * Initial revision
                     12:  * 
                     13:  * 86/11/19    Allan Cornish           /usr/src/sys/i8086/drv/console.c
                     14:  * putchar() initializes the (new) (IO).io_flag field to 0.
                     15:  */
                     16: #include <sys/coherent.h>
                     17: #include <sys/inode.h>
                     18: #include <sys/stat.h>
                     19: #include <sys/con.h>
                     20: #include <sys/io.h>
                     21: 
                     22: dev_t condev = makedev(2,0);
                     23: 
                     24: putchar(c)
                     25: int c;
                     26: {
                     27:        static coninit;
                     28:        IO iob;
                     29: 
                     30:        if (coninit == 0) {
                     31:                ++coninit;
                     32:                dopen( condev, IPW, DFCHR );
                     33:        }
                     34: 
                     35:        if (c == '\n')
                     36:                putchar('\r');
                     37: 
                     38:        iob.io_seg  = IOSYS;
                     39:        iob.io_ioc  = 1;
                     40:        iob.io_base = &c;
                     41:        iob.io_flag = 0;
                     42:        dwrite( condev, &iob );
                     43: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.