console.h

来自「A few drivers for the Motorola C380 s ce」· C头文件 代码 · 共 37 行

H
37
字号
#ifndef CONSOLE_DRV_H
#define CONSOLE_DRV_H

#include "../libs/motolibs.h"

/* Clear console viewport */
void console_clearscreen(void);

/* Set console wiewport, in pixels */
void console_setviewport(byte nx1, byte ny1, byte nx2, byte ny2);

/* Set colors used for console output */
void console_setcolors(hword bgcol, hword forecol);

/* Initialise the console */
void console_init(void);

/* Put a character onto console */
void console_putchar(unsigned char ch, byte xp, byte yp, hword bgcol, hword chcol);

/* Print a string on the console */
void console_printstr(char * str);

/* Print a hexadecimal number on the console */
//TODO: lacks documentation
void console_printui32_hex(word num, byte chars, bool prefix);

/* Print a decimal number on the console */
void console_printui32_dec(word num);

/* Set cursor to a position */
void console_gotoxy(byte xp, byte yp);

/* Starts a new line */
void console_newline(void);

#endif

⌨️ 快捷键说明

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