本文整理汇总了C++中putfonts8_asc函数的典型用法代码示例。如果您正苦于以下问题:C++ putfonts8_asc函数的具体用法?C++ putfonts8_asc怎么用?C++ putfonts8_asc使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了putfonts8_asc函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HariMain
void HariMain(void)
{
struct BOOTINFO *binfo = (struct BOOTINFO *) ADR_BOOTINFO;
char s[40], mcursor[256], keybuf[32];
int mx, my, i;
init_gdtidt();
init_pic();
io_sti();
fifo8_init(&keyfifo, 32, keybuf);
io_out8(PIC0_IMR, 0xf9);
io_out8(PIC1_IMR, 0xef);
init_palette();
init_screen8(binfo->vram, binfo->scrnx, binfo->scrny);
mx = (binfo->scrnx - 16) / 2;
my = (binfo->scrny - 28 - 16) / 2;
init_mouse_cursor8(mcursor, COL8_008484);
putblock8_8(binfo->vram, binfo->scrnx, 16, 16, mx, my, mcursor, 16);
putfonts8_asc(binfo->vram, binfo->scrnx, 0, 0, COL8_FFFFFF, s);
for (;;) {
io_cli();
if (fifo8_status(&keyfifo) == 0) {
io_stihlt();
} else {
i = fifo8_get(&keyfifo);
io_sti();
boxfill8(binfo->vram, binfo->scrnx, COL8_008484, 0, 16, 15, 31);
putfonts8_asc(binfo->vram, binfo->scrnx, 0, 16, COL8_FFFFFF, s);
}
}
}
示例2: HariMain
void HariMain(void)
{
char *vram;
BOOTINFO_t *binfo;
char mcursor[16*16];
int mx, my;
binfo = (BOOTINFO_t *)BOOTINFO_ENTRY;
init_palette();
init_screen(binfo->vram, binfo->scrnx, binfo->scrny);
static char font_A[16] = {
0x00, 0x18, 0x18, 0x18, 0x18, 0x24, 0x24, 0x24,
0x24, 0x7e, 0x42, 0x42, 0x42, 0xe7, 0x00, 0x00
};
putfont8(binfo->vram, binfo->scrnx, 8, 8, COL8_0000FF, hankaku+'A'*16);
putfonts8_asc(binfo->vram, binfo->scrnx, 16, 8, COL8_0000FF, "BC 123");
putfonts8_asc(binfo->vram, binfo->scrnx, 31, 31, COL8_000000, "EasyOS.");
putfonts8_asc(binfo->vram, binfo->scrnx, 30, 30, COL8_FFFFFF, "EasyOS.");
mx = my = 100;
init_mouse_cursor8(mcursor, COL8_008484);
putblock8_8(binfo->vram, binfo->scrnx, 16, 16, mx, my, mcursor, 16);
fin:
io_hlt();
goto fin;
}
示例3: HariMain
void HariMain(void)
{
struct BOOTINFO *binfo = (struct BOOTINFO *) ADR_BOOTINFO;
char s[40], mcursor[256], keybuf[32], mousebuf[128];
int mx, my, i;
init_gdtidt();
init_pic();
io_sti(); /* IDT/PIC的初始化结束,开启CPU中断 */
fifo8_init(&keyfifo, 32, keybuf);
fifo8_init(&mousefifo, 128, mousebuf);
io_out8(PIC0_IMR, 0xf9); /* 许可PIC1和键盘(11111001) */
io_out8(PIC1_IMR, 0xef); /* 许可鼠标(11101111) */
init_keyboard();
init_palette();
init_screen8(binfo->vram, binfo->scrnx, binfo->scrny);
mx = (binfo->scrnx - 16) / 2;
my = (binfo->scrny - 28 - 16) / 2;
init_mouse_cursor8(mcursor, COL8_008484);
putblock8_8(binfo->vram, binfo->scrnx, 16, 16, mx, my, mcursor, 16);
sprintf(s, "(%d, %d)", mx, my);
putfonts8_asc(binfo->vram, binfo->scrnx, 0, 0, COL8_FFFFFF, s);
enable_mouse();
for (;;) {
io_cli();
if (fifo8_status(&keyfifo) + fifo8_status(&mousefifo) == 0) {
/* J
char ss[10];
sprintf(ss, "%c", "J");
putfonts8_asc(binfo->vram, binfo->scrnx, 100, 100, COL8_FFFFFF, ss);
*/
io_stihlt();
} else if (fifo8_status(&keyfifo) != 0) {
i = fifo8_get(&keyfifo);
io_sti();
sprintf(s, "%02X", i);
boxfill8(binfo->vram, binfo->scrnx, COL8_008484, 0, 16, 15, 31);
putfonts8_asc(binfo->vram, binfo->scrnx, 0, 16, COL8_FFFFFF, s);
} else if (fifo8_status(&mousefifo) != 0) {
i = fifo8_get(&mousefifo);
io_sti();
sprintf(s, "%02X", i);
boxfill8(binfo->vram, binfo->scrnx, COL8_008484, 32, 16, 47, 31);
putfonts8_asc(binfo->vram, binfo->scrnx, 32, 16, COL8_FFFFFF, s);
}
}
}
示例4: putfonts8_asc_sht
void putfonts8_asc_sht(struct SHEET *sht, int x, int y, int c, int b, char *s, int l)
{
struct TASK *task = task_now();
boxfill8(sht->buf, sht->bxsize, b, x, y, x + l * 8 - 1, y + 15);
if (task->langmode != 0 && task->langbyte1 != 0) {
putfonts8_asc(sht->buf, sht->bxsize, x, y, c, s);
sheet_refresh(sht, x - 8, y, x + l * 8, y + 16);
} else {
putfonts8_asc(sht->buf, sht->bxsize, x, y, c, s);
sheet_refresh(sht, x, y, x + l * 8, y + 16);
}
return;
}
示例5: HariMain
void HariMain(void)
{
struct BOOTINFO *binfo = (struct BOOTINFO *) 0x0ff0;
init_palette();
init_screen(binfo->vram, binfo->scrnx, binfo->scrny);
putfonts8_asc(binfo->vram, binfo->scrnx, 8, 8, COL8_FFFFFF, "ABC 123");
putfonts8_asc(binfo->vram, binfo->scrnx, 31, 31, COL8_000000, "Haribote OS.");
putfonts8_asc(binfo->vram, binfo->scrnx, 30, 30, COL8_FFFFFF, "Haribote OS.");
for (;;) {
io_hlt();
}
}
示例6: make_wtitle8
void make_wtitle8(unsigned char* buf, int xsize, char* title, char act)
{
static char closebtn[7][8] = {
"oo oo",
" oo oo ",
" oooo ",
" oo ",
" oooo ",
" oo oo ",
"oo oo",
}; /* 仿 Windows 8 关闭按钮 */
int x, y;
char c;
boxfill8(buf, xsize, act ? blue : base1, 1, 1, xsize - 2, 20);
boxfill8(buf, xsize, act ? orange : base00, xsize - 30, 1, xsize - 2, 18);
for (y = 0; y < 7; y++) {
for (x = 0; x < 8; x++) {
c = closebtn[y][x];
if (c == 'o') {
buf[(7 + y) * xsize + (xsize - 19 + x)] = base3;
}
}
}
putfonts8_asc(buf, xsize, (xsize - strlen(title) * FNT_W) / 2, (22 - FNT_H) / 2, base3, title);
return;
}
示例7: print_on_screen
void print_on_screen(char *msg)
{
struct BOOTINFO *bootinfo = (struct BOOTINFO *) ADR_BOOTINFO;
int x0 = 10, y0 = 200;
static int invoke_count = 0;
boxfill8(bootinfo->vram,bootinfo->scrnx, COL8_848484, x0, y0 + invoke_count * 16, x0 + strlen(msg)*8, y0 + invoke_count * 16 + 16);
putfonts8_asc(bootinfo->vram, bootinfo->scrnx, x0, y0 + invoke_count * 16, COL8_000000, msg);
invoke_count++;
//没有空间记录日志,则刷新日志,从头开始显示日志
if(invoke_count == 35){
invoke_count = 0;
boxfill8(bootinfo->vram,bootinfo->scrnx, COL8_008484, x0, y0, x0 + 1024, y0 + 768);
putfonts8_asc(bootinfo->vram, bootinfo->scrnx, x0, y0 + invoke_count * 16, COL8_000000, msg);
}
}
示例8: HariMain
void HariMain(void)
{
struct BOOTINFO *binfo = (struct BOOTINFO *) ADR_BOOTINFO;
char s[40],mcursor[256];
int mx, my;
init_gdtidt();
init_pic();
io_sti();
init_palette();
init_screen8(binfo->vram, binfo->scrnx, binfo->scrny);
mx = (binfo->scrnx - 16) / 2;
my = (binfo->scrny - 28 - 16) / 2;
init_mouse_cursor8(mcursor, COL8_008484);
putblock8_8(binfo->vram, binfo->scrnx, 16, 16, mx, my, mcursor, 16);
sprintf(s, "(%d, %d)", mx, my);
putfonts8_asc(binfo->vram, binfo->scrnx, 0, 0, COL8_FFFFFF, s);
io_out8(PIC0_IMR, 0xf9);
io_out8(PIC1_IMR, 0xef);
for (;;) {
io_hlt();
}
}
示例9: bootmain
/*
void bootmain(void){
//注意这里的函数名字为bootmain,因为在entry.S中设定的入口名字也是bootmain,两者要保持一致
clear_screen(40);
char *vram;
int xsize, ysize;
struct BOOTINFO *binfo;
binfo=(struct BOOTINFO *)0x0ff0;
init_screen((struct BOOTINFO*)0x0ff0);
draw_window();
init_palette();
vram=(char *)0x0ff0;
char font_A[16]={
0x00, 0x18, 0x18, 0x18, 0x18, 0x24, 0x24, 0x24,
0x24, 0x7e, 0x42, 0x42, 0x42, 0xe7, 0x00, 0x00
};
//putfont8(vram, 20, 50, 50, 'd', font_A);
putfont8(binfo->vram binfo->xsize, 8, 8, COL8_FFFFFF, font_A);
}
*/
void bootmain(void){
struct BOOTINFO *binfo = (struct BOOTINFO*) 0x0ff0;
extern char hankaku[2048];
init_palette();
init_screen(binfo->vram, binfo->scrnx, binfo->scrny);
//putfont8_asc(binfo->vram, binfo->scrnx, 8, 8, COL8_FFFFFF, "ChrisZZ");
//putfont8_asc(binfo->vram, binfo->scrnx, 31, 31, COL8_000000, "Haribote OS");
//putfont8_asc(binfo->vram, binfo->scrnx, 32, 32, COL8_FFFFFF, "Haribote OS");
char s[10];
//sprintf(s, "scrnx=%d", binfo->scrnx);
//putfont8_asc(binfo->vram, binfo->scrnx, 16, 64, COL8_FFFFFF, s);
char mcursor[256];
int mx, my;
mx = (binfo->scrnx-16)/2;
my = (binfo->scrny-28-16)/2;
init_mouse_cursor8(mcursor, COL8_008484);
putblock8_8(binfo->vram, binfo->scrnx, 16, 16, mx, my, mcursor, 16);
sprintf(s, "(%d, %d)", mx, my);
putfonts8_asc(binfo->vram, binfo->scrnx, 0, 0, COL8_FFFFFF, s);
while(1);
}
示例10: HariMain
void HariMain(void)
{
struct BOOTINFO *binfo = (struct BOOTINFO *) ADR_BOOTINFO;
/* s是输出缓冲区 mcursor存放鼠标图形 */
char s[40], mcursor[256];
int mx, my;
init_gdtidt(); /* 初始化GDT, IDT */
init_pic(); /* 初始化PIC */
io_sti(); /* 打开所有可屏蔽中断 */
init_palette(); /* 初始化调色板 */
init_screen8(binfo->vram, binfo->scrnx, binfo->scrny); /* 绘制"桌面" */
mx = (binfo->scrnx - 16) / 2; /* 计算鼠标图形在屏幕上的位置 它在整个桌面的中心位置 */
my = (binfo->scrny - 28 - 16) / 2;
init_mouse_cursor8(mcursor, COL8_008484);
putblock8_8(binfo->vram, binfo->scrnx, 16, 16, mx, my, mcursor, 16); /* 显示鼠标图形 */
sprintf(s, "(%d, %d)", mx, my);
putfonts8_asc(binfo->vram, binfo->scrnx, 0, 0, COL8_FFFFFF, s); /* 输出鼠标图形左上角在屏幕上的坐标 */
io_out8(PIC0_IMR, 0xf9); /* PIC0(11111001) (打开IRQ1键盘中断和连接从PIC的IRQ2)*/
io_out8(PIC1_IMR, 0xef); /* PIC1(11101111) (打开PS2鼠标中断 即IRQ12)*/
for (;;) {
io_hlt();
}
}
示例11: putfonts8_asc_sht
void putfonts8_asc_sht(sheet_t* sht, int x, int y, int c, int b, char* s, int l)
{
boxfill8(sht->buf, sht->bxsize, b, x, y, x + l * FNT_W - 1, y + FNT_H - 1);
putfonts8_asc(sht->buf, sht->bxsize, x, y, c, s);
sheet_refresh(sht, x, y, x + l * FNT_W, y + FNT_H);
return;
}
示例12: print_debug
void print_debug(char *str)
{
struct BOOTINFO *binfo;
binfo = (struct BOOTINFO *) 0xff0;
boxfill8(binfo->vram, binfo->scrnx, COL8_008484, 0, 128, 320, 128 + 16);
putfonts8_asc(binfo->vram, binfo->scrnx, 0, 128, COL8_FFFFFF, str);
}
示例13: debug_print
void debug_print(int x, int y, unsigned char *s)
{
struct BOOTINFO *binfo = (struct BOOTINFO *) ADR_BOOTINFO;
putfonts8_asc(binfo->vram, binfo->scrnx, x, y, COL8_FF0000, s);
return;
}
示例14: inthandler27
// P119 需要执行 STI
void inthandler27(int *esp)
{
BOOTINFO_t *binfo = (BOOTINFO_t *) BOOTINFO_ENTRY;
boxfill8(binfo->vram, binfo->scrnx, COL8_000000, 0, 0, 32 * 8 - 1, 15);
putfonts8_asc(binfo->vram, binfo->scrnx, 0, 0, COL8_FFFFFF, "INT 27 (IRQ-7) : None");
io_out8(PIC0_OCW2, 0x67);
}
示例15: putfonts8_asc_sht
void putfonts8_asc_sht(struct SHEET *sht, int x, int y, int c, int b, char *s, int l)
{
boxfill8(sht->buf, sht->bxsize, b, x, y, x + l * 8 - 1, y + 15);
putfonts8_asc(sht->buf, sht->bxsize, x, y, c, s);
sheet_refresh(sht, x, y, x + l * 8, y + 16);
return;
}