mirror of
https://github.com/yourtion/30dayMakeOS.git
synced 2026-02-05 02:53:19 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
916b0b2957 |
@@ -393,9 +393,9 @@ void console_task(struct SHEET *sheet)
|
||||
{
|
||||
struct TIMER *timer;
|
||||
struct TASK *task = task_now();
|
||||
|
||||
int i, fifobuf[128], cursor_x = 16, cursor_y = 28, cursor_c = -1;
|
||||
char s[2];
|
||||
int x, y;
|
||||
|
||||
fifo32_init(&task->fifo, 128, fifobuf, task);
|
||||
timer = timer_alloc();
|
||||
@@ -444,6 +444,27 @@ void console_task(struct SHEET *sheet)
|
||||
}
|
||||
} else if (i == 10 + 256) {
|
||||
/*回车键*/
|
||||
/*用空格将光标擦除*/
|
||||
putfonts8_asc_sht(sheet, cursor_x, cursor_y, COL8_FFFFFF, COL8_000000, " ", 1);
|
||||
if (cursor_y < 28 + 112) {
|
||||
cursor_y += 16; /*换行*/
|
||||
} else {
|
||||
/*滚动*/
|
||||
for (y = 28; y < 28 + 112; y++) {
|
||||
for (x = 8; x < 8 + 240; x++) {
|
||||
sheet->buf[x + y * sheet->bxsize] = sheet->buf[x + (y + 16) * sheet->bxsize];
|
||||
}
|
||||
}
|
||||
for (y = 28 + 112; y < 28 + 128; y++) {
|
||||
for (x = 8; x < 8 + 240; x++) {
|
||||
sheet->buf[x + y * sheet->bxsize] = COL8_000000;
|
||||
}
|
||||
}
|
||||
sheet_refresh(sheet, 8, 28, 8 + 240, 28 + 128);
|
||||
}
|
||||
/*显示提示符*/
|
||||
putfonts8_asc_sht(sheet, 8, cursor_y, COL8_FFFFFF, COL8_000000, ">", 1);
|
||||
cursor_x = 16;
|
||||
if (cursor_y < 28 + 112) {
|
||||
/*用空格将光标擦除*/
|
||||
putfonts8_asc_sht(sheet, cursor_x, cursor_y, COL8_FFFFFF, COL8_000000, " ", 1);
|
||||
|
||||
Reference in New Issue
Block a user