Deleted Added
full compact
vidconsole.c (42002) vidconsole.c (42207)
1/*
2 * Copyright (c) 1998 Michael Smith (msmith@freebsd.org)
3 * Copyright (c) 1997 Kazutaka YOKOTA (yokota@zodiac.mech.utsunomiya-u.ac.jp)
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 12 unchanged lines hidden (view full) ---

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * From Id: probe_keyboard.c,v 1.13 1997/06/09 05:10:55 bde Exp
28 *
1/*
2 * Copyright (c) 1998 Michael Smith (msmith@freebsd.org)
3 * Copyright (c) 1997 Kazutaka YOKOTA (yokota@zodiac.mech.utsunomiya-u.ac.jp)
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 12 unchanged lines hidden (view full) ---

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * From Id: probe_keyboard.c,v 1.13 1997/06/09 05:10:55 bde Exp
28 *
29 * $Id: vidconsole.c,v 1.8 1998/10/31 02:53:12 msmith Exp $
29 * $Id: vidconsole.c,v 1.9 1998/12/22 11:51:25 abial Exp $
30 */
31
32#include <stand.h>
33#include <bootstrap.h>
34#include <btxv86.h>
35#include <machine/psl.h>
36#include "libi386.h"
37

--- 77 unchanged lines hidden (view full) ---

115 bg_c=0;
116#endif
117 for(i = 0; i < 10 && vidc_ischar(); i++)
118 (void)vidc_getchar();
119 return(0); /* XXX reinit? */
120}
121
122static void
30 */
31
32#include <stand.h>
33#include <bootstrap.h>
34#include <btxv86.h>
35#include <machine/psl.h>
36#include "libi386.h"
37

--- 77 unchanged lines hidden (view full) ---

115 bg_c=0;
116#endif
117 for(i = 0; i < 10 && vidc_ischar(); i++)
118 (void)vidc_getchar();
119 return(0); /* XXX reinit? */
120}
121
122static void
123vidc_biosputchar(int c)
124{
125 v86.ctl = 0;
126 v86.addr = 0x10;
127 v86.eax = 0xe00 | c;
128 v86.ebx = 0x7;
129 v86int();
130}
131
132static void
123vidc_rawputchar(int c)
124{
125 int i;
126
127 if(c == '\t')
128 /* lame tab expansion */
129 for (i = 0; i < 8; i++)
130 vidc_rawputchar(' ');
131 else {
132#ifndef TERM_EMU
133vidc_rawputchar(int c)
134{
135 int i;
136
137 if(c == '\t')
138 /* lame tab expansion */
139 for (i = 0; i < 8; i++)
140 vidc_rawputchar(' ');
141 else {
142#ifndef TERM_EMU
133 v86.ctl = 0;
134 v86.addr = 0x10;
135 v86.eax = 0xe00 | c;
136 v86.ebx = 0x7;
137 v86int();
143 vidc_biosputchar(c);
138#else
139 /* Emulate AH=0eh (teletype output) */
140 switch(c) {
144#else
145 /* Emulate AH=0eh (teletype output) */
146 switch(c) {
147 case '\a':
148 vidc_biosputchar(c);
149 return;
141 case '\r':
142 curx=0;
143 curs_move(curx,cury);
144 return;
145 case '\n':
146 cury++;
147 if(cury>24) {
148 scroll_up(1,fg_c,bg_c);

--- 470 unchanged lines hidden ---
150 case '\r':
151 curx=0;
152 curs_move(curx,cury);
153 return;
154 case '\n':
155 cury++;
156 if(cury>24) {
157 scroll_up(1,fg_c,bg_c);

--- 470 unchanged lines hidden ---