aboutsummaryrefslogtreecommitdiff
path: root/sys/boot
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2004-11-24 14:54:33 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2004-11-24 14:54:33 +0000
commit8b8d44db277ac749bda66566bbe6c38edaeaf2dd (patch)
treeee879de63187c0107329697009cdae27daa682c5 /sys/boot
parent4bc6b2af2e9212cbb95da415587479bfdb50469e (diff)
Notes
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/i386/btx/btx/btx.S15
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/boot/i386/btx/btx/btx.S b/sys/boot/i386/btx/btx/btx.S
index 7581519ba536..f7d848f3fbe1 100644
--- a/sys/boot/i386/btx/btx/btx.S
+++ b/sys/boot/i386/btx/btx/btx.S
@@ -975,8 +975,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
@@ -992,15 +993,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
@@ -1013,16 +1016,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