📄 klib.h
字号:
#include "../../include/toyos.h"PUBLIC int mystrlen(const char *str);PUBLIC char *itoa(char *str,int num);PUBLIC void DisplayInt(int Num);PUBLIC void * memmove_kk(void * dest,const void *src,unsigned int count);PRIVATE int skip_atoi(const char **s);PRIVATE char * number(char * str, int num, int base, int size, int precision,int type);PUBLIC int vsprintf(char *buf, const char *fmt, va_list args);PUBLIC int printk(const char * fmt, ...);PUBLIC int printf(const char * fmt, ...);PUBLIC int panic(const char * fmt, ...);PUBLIC void clear();PUBLIC char * strcpy(char * strDest,const char * strSrc);
/***********************************************************************/extern Write(char *buf,int len,int Console);extern void OutByte(t_port Port,t_8 Value);//string
extern t_8 InByte(t_port Port);//string
extern void* MemoryCopy(void* pDest,void *pSrc,int Size);//string
extern void MemorySet(void* pDest, char ch, int Size);//string
extern void DisplayString(char * pStr);//string
extern void DisplayColorString(char *pStr,int Color);//string
extern void DisableIrq(int Irq);//string
extern void EnableIrq(int Irq);//string
extern void LockIrq();//string
extern void UnLock();//string
/***********************************************************************/#define is_digit(c) ((c) >= '0' && (c) <= '9')
#define ZEROPAD 1 /* pad with zero */
#define SIGN 2 /* unsigned/signed long */
#define PLUS 4 /* show plus */
#define SPACE 8 /* space if plus */
#define LEFT 16 /* left justified */
#define SPECIAL 32 /* 0x */
#define SMALL 64 /* use 'abcdef' instead of 'ABCDEF' */#define do_div(n,base) ({ int __res; __asm__("divl %4":"=a" (n),"=d" (__res):"0" (n),"1" (0),"r" (base)); __res; })
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -