博主:mao1984
+加为好友
+发送站内短信
+我的博客精华
+我的推荐文章
2007年份 (2)
2006年份 (1)
· 学习UCOSII
· 求助:这个FM导频率电路电路看不懂
· 终于可以登陆了
更多>>
· 这个在BC45下面编译通不过 *pscr++ = c; 好像是提示这…
· #include <stdio.h> #include <conio.h> #include <st…
· char far *farstr;
printf ("the address pointed to by str is %04X:%04X\n", FP_SEG(str), FP_OFF(str)); farstr = (char far *)MK_FP( FP_SEG(str), FP_OFF(str));
printf ("the string pointed by far pointer is %s\n", farstr); return 0;}
· 博主,欢迎来到EDN,建议您用IE6的浏览器,咱们…
日志总数:3 篇
评论数量:4
访问次数:1895
标签: 无标签
把学习过程记录下来吧.也算做是自己的笔记.不喜欢手写.
系统分类: 单片机 | 用户分类: 无分类 | 来源: 无分类 | 【推荐给朋友】 | 【添加到收藏夹】
投一票您将和博主都有获奖机会!
mao1984
2007-6-19 20:40:18
#include <stdio.h>#include <conio.h>#include <string.h>#include <dos.h>#include <malloc.h>#define DISP_MAX_X 80#define DISP_BASE 0xB800
void PC_DispChar (char x, char y, char c, char color){ char far *pscr; int offset;
offset = (int)y * DISP_MAX_X * 2 + (int)x * 2; /* Calculate position on the screen */ pscr = (char far *)MK_FP(DISP_BASE, offset); *pscr++ = c; /* Put character in video RAM */ *pscr = color; /* Put video attribute in video RAM */}main(){ PC_DispChar(20,14,50,12);return 0;}
2007-6-19 20:41:01
这个在BC45下面编译通不过
*pscr++ = c;
好像是提示这个有错
2007-6-19 20:24:20
/* MK_FP example */
#include <stdio.h>#include <conio.h>#include <string.h>#include <dos.h>#include <malloc.h>
main(){
char *str = "hello\n"; char far *farstr;