summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2000-10-18 15:22:36 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2000-10-18 15:22:36 +0000
commit3ec32f4232aa46d9bcb39dffb8073b6023ff9efc (patch)
tree50e7e803c0c2de520abb3491e15df23d775e9503 /sys/arch/i386
parentbd58678178780033331f80a86a52a9ab852371d8 (diff)
before sending a character check for DSR state.
from: Martin Portmann <map@infinitum.ch>
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/stand/libsa/bioscons.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/arch/i386/stand/libsa/bioscons.c b/sys/arch/i386/stand/libsa/bioscons.c
index 28ae82f16ac..7d33f87cb7d 100644
--- a/sys/arch/i386/stand/libsa/bioscons.c
+++ b/sys/arch/i386/stand/libsa/bioscons.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bioscons.c,v 1.18 2000/06/08 01:51:32 mickey Exp $ */
+/* $OpenBSD: bioscons.c,v 1.19 2000/10/18 15:22:35 mickey Exp $ */
/*
* Copyright (c) 1997-1999 Michael Shalayeff
@@ -212,7 +212,16 @@ com_putc(dev, c)
{
register int rv;
+ dev = minor(dev) & 0x7f;
+
+ /* check online (DSR) */
+ __asm __volatile(DOINT(0x14) : "=a" (rv) :
+ "0" (0x300), "d" (dev) : "%ecx", "cc" );
+ if ( !(rv & 0x20) )
+ return;
+
+ /* send character */
__asm __volatile(DOINT(0x14) : "=a" (rv) :
- "d" (minor(dev)), "0" (c | 0x100) : "%ecx", "cc" );
+ "0" (c | 0x100), "d" (dev) : "%ecx", "cc" );
}