summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2004-11-29 11:54:42 +0000
committernyan <nyan@FreeBSD.org>2004-11-29 11:54:42 +0000
commitfc028efa4c6850330ff04eec69f0d31916616649 (patch)
tree6f17b2efe2af0adbd55b6affab65a744fb48037c /sys/boot
parent4e1356aa93d8feaca102c475335dc666066d81a2 (diff)
downloadFreeBSD-src-fc028efa4c6850330ff04eec69f0d31916616649.zip
FreeBSD-src-fc028efa4c6850330ff04eec69f0d31916616649.tar.gz
MFi386: revision 1.38.
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/pc98/btx/btx/btx.S15
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/boot/pc98/btx/btx/btx.S b/sys/boot/pc98/btx/btx/btx.S
index 9100eb3..6ee9f8f 100644
--- a/sys/boot/pc98/btx/btx/btx.S
+++ b/sys/boot/pc98/btx/btx/btx.S
@@ -1081,8 +1081,9 @@ putstr: lodsb # Load char
.set SIO_FMT,SIOFMT # 8N1
.set SIO_DIV,(115200/SIOSPD) # 115200 / SPD
+/*
* void sio_init(void)
-
+ */
sio_init: movw $SIO_PRT+0x3,%dx # Data format reg
movb $SIO_FMT|0x80,%al # Set format
outb %al,(%dx) # and DLAB
@@ -1098,15 +1099,17 @@ sio_init: movw $SIO_PRT+0x3,%dx # Data format reg
outb %al,(%dx) # DTR
incl %edx # Line status reg
+/*
* void sio_flush(void)
-
+ */
sio_flush.0: call sio_getc.1 # Get character
sio_flush: call sio_ischar # Check for character
jnz sio_flush.0 # Till none
ret # To caller
+/*
* void sio_putc(int c)
-
+ */
sio_putc: movw $SIO_PRT+0x5,%dx # Line status reg
xor %ecx,%ecx # Timeout
movb $0x40,%ch # counter
@@ -1119,16 +1122,18 @@ sio_putc.1: inb (%dx),%al # Transmitter
outb %al,(%dx) # Write character
sio_putc.2: ret $0x4 # To caller
+/*
* int sio_getc(void)
-
+ */
sio_getc: call sio_ischar # Character available?
jz sio_getc # No
sio_getc.1: subb $0x5,%dl # Receiver buffer reg
inb (%dx),%al # Read character
ret # To caller
+/*
* int sio_ischar(void)
-
+ */
sio_ischar: movw $SIO_PRT+0x5,%dx # Line status register
xorl %eax,%eax # Zero
inb (%dx),%al # Received data
OpenPOWER on IntegriCloud