📄 prints.c
字号:
/* CXL - Copyright (c) 1987-1989 by Mike Smedley - All Rights Reserved */
/* PRINTS.C - prints a string at specified location */
#include <conio.h>
#include <dos.h>
#include <string.h>
#include "cxldef.h"
#include "cxlvid.h"
void prints(int row,int col,int attr,char *str)
{
register char *q;
int oldrow,oldcol;
FARPTR p;
/* convert attribute if monochrome adapter */
attr=mapattr(attr);
#ifdef COMMENT_OUT
/* save current cursor location */
readcur(&oldrow,&oldcol);
/* do while more characters */
for(q=str;*q;q++) {
gotoxy_(row,col++);
putchat(*q,attr);
}
/* restore cursor location */
gotoxy_(oldrow,oldcol);
#else
FP_SET(p, ((row*_vinfo.numcols)+col)*2, SS_SCREEN);
for (q=str; *q; q++) {
PokeFarWord(p, (USHORT)(attr << 8 | (*q & 0xff)));
p.Off += 2;
}
#endif
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -