|
![](http://cache.amobbs.com/bbs_upload782111/files_40/ourdev_643538HY9WAS.jpg)
(原文件名:MKOS效果2.jpg)
typedef struct {
uint8 Blue;
uint8 Green;
uint8 Cyan;
uint8 Red;
uint8 Purple;
uint8 Brown;
uint8 LightGray;
uint8 DarkGray;
uint8 LightBlue;
uint8 LightGreen;
uint8 LightGyan;
uint8 LightRed;
uint8 LightPurple;
uint8 Yellow;
uint8 White
}FColor;
FColor FgndColor={1,2,3,4,5,6,7,8,9,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f};
void Uart0_SendDOSByte(uint8 x,uint8 y,uint8 color,uint8 data)//依次发送横坐标(<60),纵坐标(<13),颜色,字符ascii码
//因为我喜欢打字号,大家可以下载源码然后修改里面的字号,来实现更多的字符
{
UART0_SendByte(0xff); //调用你自己的串口发送字节函数
UART0_SendByte(x);
UART0_SendByte(y);
UART0_SendByte(color);
UART0_SendByte(data);
}
void Uart0_SendDOSStr(uint8 x,uint8 y,uint8 color,uint8 *str)
{
while (1)
{
if (*str == '\0') break;
Uart0_SendDOSByte(x++,y,color,*str++);
}
}
在其他函数中调用
#include "stdio.h"
sprintf(printtemp,"this is task2!--b:%4d%4d%4d%4d%4d%4d%4d%4d%4d%4d",b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8],b[9]);
Uart0_SendDOSStr(0,5,FgndColor.LightGray,printtemp);
下载地址
http://www.ourdev.cn/bbs/bbs_content.jsp?bbs_sn=4767418&bbs_page_no=1&search_mode=3&search_text=hzr0071&bbs_id=9999###
其实是看俺的那篇帖子没人理,俺写的系统没人理,上位机竟然也没人理。。。。。。。
不是有人很想要这种在特定位置写字符的上位机么,,,,
我发现有人就是懒,他宁愿等别人写,自己也不写。。。。。
如果你电脑上有.net2.0可以直接使用exe文件,不兼容.net3.0哦 |
阿莫论坛20周年了!感谢大家的支持与爱护!!
知道什么是神吗?其实神本来也是人,只不过神做了人做不到的事情 所以才成了神。 (头文字D, 杜汶泽)
|