summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1997-08-12 23:34:22 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1997-08-12 23:34:22 +0000
commitf1951a48d1095251e043062721afc7b47fedda2a (patch)
tree1dab549e29e85e3855488a12f17c0f13d9593a27 /sys/arch
parent7d63dcea0a2ced00cd7096abfa59159f91037b2b (diff)
_you_, hear?! never touch anything when doing commits!
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/i386/stand/libsa/bioscons.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/sys/arch/i386/stand/libsa/bioscons.c b/sys/arch/i386/stand/libsa/bioscons.c
index a365453bc74..68ba53d37d1 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.1 1997/08/12 21:39:01 mickey Exp $ */
+/* $OpenBSD: bioscons.c,v 1.2 1997/08/12 23:34:21 mickey Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -66,19 +66,18 @@ kbd_getc(dev)
dev_t dev;
{
u_int8_t rv;
- __asm volatile("movb $1, %%ah\n\t"
- DOINT(0x16) "\n\t"
- "setz %%al"
- : "=a" (rv) :: "%ecx", "%edx", "cc" );
- if (rv)
- return 0;
- if (minor(dev) & 0x80)
- return 1;
+ if (dev & 0x80) {
+ __asm volatile("movb $1, %%ah\n\t"
+ DOINT(0x16) "\n\t"
+ "setnz %%al"
+ : "=a" (rv) :: "%ecx", "%edx", "cc" );
+ return rv;
+ }
- __asm volatile("xorl %%eax, %%eax\n\t"
- DOINT(0x16) "\n\t"
- : "=a" (rv) :: "%ecx", "edx", "cc" );
+ __asm __volatile("xorl %%eax, %%eax\n\t"
+ DOINT(0x16)
+ : "=a" (rv) :: "%ecx", "edx", "cc" );
return rv;
}
@@ -87,10 +86,9 @@ kbd_putc(dev, c)
dev_t dev;
int c;
{
- __asm volatile("movb $0x0e, %%ah\n\t"
- "movl $0, %%ebx\n\t"
+ __asm __volatile("movb $0x0e, %%ah\n\t"
DOINT(0x10)
- :: "a" (c) : "%ecx", "%edx", "cc" );
+ :: "a" (c), "b" (0) : "%ecx", "%edx", "cc" );
}
void
@@ -98,7 +96,7 @@ com_probe(cn)
struct consdev *cn;
{
register int i, n;
- __asm volatile(DOINT(0x11) "\n\t" /* get equipment (9-11 # of coms) */
+ __asm __volatile(DOINT(0x11) "\n\t" /* get equipment (9-11 # of coms) */
: "=a" (n) :: "%ecx", "%edx", "cc");
n >>= 9;
n &= 7;