Home | History | Annotate | Download | only in common

Lines Matching defs:cons

47 struct cons cons;
57 cons.cursor = nullcursor;
58 cons.scroll = nullscroll;
59 cons.cursor_enable = false;
60 cons.erace_previous_cursor = false;
69 cons.type = CONS_FB_KSEG2;
72 cons.init();
76 cons.type = CONS_SIO1;
78 cons.init();
82 cons.type = CONS_SIO2;
84 cons.init();
96 cons.type = CONS_FB_KSEG2;
99 cons.init();
103 cons.type = CONS_SIO1;
105 cons.init();
109 cons.type = CONS_SIO2;
111 cons.init();
119 cons.getc = ROM_GETC;
120 cons.scan = rom_scan;
121 cons.putc = ROM_PUTC;
122 cons.init = cons_rom_init;
123 cons.scroll = cons_rom_scroll;
124 cons.type = CONS_ROM;
125 cons.init();
135 cons.cursor_enable = on;
142 return cons.type;
150 if (cons.type == CONS_SIO1 || cons.type == CONS_SIO2) {
152 cons.putc(0, 0, '\r');
153 cons.putc(0, 0, c);
157 if (cons.cursor_enable && cons.erace_previous_cursor)
158 cons.cursor(cons.x * ROM_FONT_WIDTH, cons.y * ROM_FONT_HEIGHT);
162 cons.putc(cons.x * ROM_FONT_WIDTH, cons.y * ROM_FONT_HEIGHT, c);
163 if (++cons.x == CONS_WIDTH) {
164 cons.x = X_INIT;
165 cons.y++;
169 cons.putc(cons.x * ROM_FONT_WIDTH, cons.y * ROM_FONT_HEIGHT, c);
170 cons.x = cons.x == X_INIT ? X_INIT : cons.x - 1;
171 if (cons.cursor_enable)
172 cons.putc(cons.x * ROM_FONT_WIDTH,
173 cons.y * ROM_FONT_HEIGHT, ' ');
174 cons.putc(cons.x * ROM_FONT_WIDTH, cons.y * ROM_FONT_HEIGHT, c);
177 for (i = cons.x % 8; i < 8; i++) {
178 cons.putc(cons.x * ROM_FONT_WIDTH,
179 cons.y * ROM_FONT_HEIGHT, ' ');
180 if (++cons.x == CONS_WIDTH) {
181 cons.x = X_INIT;
182 if (++cons.y == CONS_HEIGHT)
183 cons.scroll();
188 cons.putc(cons.x * ROM_FONT_WIDTH, cons.y * ROM_FONT_HEIGHT, c);
189 cons.x = X_INIT;
192 cons.putc(cons.x * ROM_FONT_WIDTH, cons.y * ROM_FONT_HEIGHT,
194 cons.putc(cons.x * ROM_FONT_WIDTH, cons.y * ROM_FONT_HEIGHT, c);
195 cons.x = X_INIT;
196 cons.y++;
199 if (--cons.x < X_INIT)
200 cons.x = X_INIT;
203 if (++cons.x >= CONS_WIDTH)
204 cons.x = CONS_WIDTH;
207 for (i = cons.x; i < CONS_WIDTH; i++)
208 cons.putc(i * ROM_FONT_WIDTH, cons.y * ROM_FONT_HEIGHT,
213 if (cons.y == CONS_HEIGHT)
214 cons.scroll();
216 if (cons.cursor_enable) {
217 cons.cursor(cons.x * ROM_FONT_WIDTH, cons.y * ROM_FONT_HEIGHT);
218 cons.erace_previous_cursor = true;
220 cons.erace_previous_cursor = false;
228 return cons.getc();
235 return cons.scan();