⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vtcolor.c

📁 ucos_ii 在Z80系列单片机上的移植
💻 C
字号:
/*******************************************************/
/*                                                     */
/* VTcolor.c  -- VT100-compatible ANSI color and       */
/*   cursor positioning routines                       */
/*                                                     */
/*  Copyright (C) 2004, Douglas Beattie Jr.            */
/*                                                     */
/*******************************************************/

#include <stdio.h>
#include "F91eval.h"
#include "vtColor.h"

void clrscr(void)
{
     putch(0x1B);
     printf("[2J");
}

void gotoxy(unsigned char x, unsigned char y)
{
     putch(27);
     printf("[%d;%df",y,x);
}

void color(enum foreground_colors newcolor)
{
     putch(27);
     printf("[1;%d;40m",newcolor);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -