diff options
Diffstat (limited to 'sys/boot')
-rw-r--r-- | sys/boot/pc98/btx/btx/btx.S | 15 |
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 9100eb30973c..6ee9f8f35dac 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 |