void ctty(char *line)
{
+ if (line == nil) {
+ serial_init(-1);
+ } else
if (between('0', line[0], '3') && line[1] == 0) {
serial_init(line[0] - '0');
} else {
case R_HELP: help(); ok= 1; break;
case R_EXIT: exit(0);
case R_OFF: off(); ok= 1; break;
+ case R_CTTY: ctty(nil); ok= 1; break;
}
/* Command to check bootparams: */
_serial_init:
mov bx, sp
mov dx, 2(bx) ! Line number
+ mov line, #0
+ test dx, dx ! Off if line number < 0
+ js 0f
push ds
xor ax, ax
mov ds, ax ! Vector and BIOS data segment