亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? fstdio.h

?? FritzOS - 簡單的C++開發OS的實例// 英文
?? H
字號:
/* fstdio.h : FritzOS Standard I/O Header File For The FritzOS C++ Kernel   Copyright (C) 2002 Tom Fritz * This program is a part of the FritzOS kernel, and may be freely * copied under the terms of the GNU General Public License (GPL), * version 2, or at your option any later version.   For more info, look at the COPYING file.*/// defines:#ifndef FSTDIO_H#define FSTDIO_H// Includes:#include "types.h"			// need USHORT, and UCHAR#include "x86.h"			// need outportb#include "stdarg.h"			// need va_list, va_end and va_start#include "string.h"			// need strcpy#define WHITE_BLACK	0x07	// white on black text#define RED_GREEN	0x26	// red on green text#define BLUE_BLACK	1	// Blue on black#define RED_BLACK	4	// red on black#define PURPLE_BLACK	0x5	// purple on black#define YELLOW_BLACK	0x6	// yellow on black#define LIGHTBLUE_BLACK	0x9	// light blue on black#define DARKBLUE_BLACK	0x8	// dark blue on black#define GREEN_BLACK		10	// green on black#define MAGENTA_BLACK		12	// magenta on black#define LIGHTESTBLUE_BLACK	0xB	// very light blue on black// For looping so many times:#define	LOOP( x, y )		for ( x = 0; x < ( y ); x++ )// For moving the cursor back to 0, 0#define GOHOME			gotoxy( 0, 0 )#define NULL 0// Printf Defines:#define		PR_LJ	0x01	// left Justify#define		PR_CA	0x02	// Use A-F Instead Of a-f For Hex Numbers#define		PR_SG	0x04	// Signed Numeric Conversion ( %d vs. %u )#define		PR_32	0x08	// Long ( 32-bit ) Numeric Conversion#define		PR_16	0x10	// Short ( 16-bit ) Numeric Conversion#define		PR_WS	0x20	// PR_SG set and num was < 0#define		PR_LZ	0x40	// Pad Left With '0' Instead Of ' '#define		PR_FP	0x80	// Pointers Are Far// Largest number handled is 2 ^ 32 - 1, lowest radix handled is 8.// 2 ^ 32 - 1 in base 8 has 11 digits ( add 5 for trailing NULL and for slop )#define		PR_BUFLEN	16// Typedefs:typedef int ( * fnptr_t ) ( unsigned c, void** helper );// voids:void Freeze();			// freeze the computer//*********// NOTE:	k_printf HAS BEEN REMOVED because printf has more use.//*********// doprintf: printf with hex and other printing optionsint doprintf( const char *fmt, va_list args, fnptr_t fn, void *ptr );// printf - standard printfvoid printf( const char *msg, ... );// printfhelp: help printfstatic int printfhelp( unsigned c, void **ptr );// smprintf - small printf e.g. no args like %svoid smprintf( char* message );// putch - put a single charactervoid putch( UCHAR c );// update_cursor - update the cursor's placevoid update_cursor();// setcolor - set printf & putch colorvoid setcolor( unsigned color );// start textmode stuff that the OS needs to keep track of, and other thingsextern "C" void start_textmode();	// NOTE: I use the extern "C" so that the ASM module can call this..					//  even though start_textmode is defined here.// gotoxy: move the cursor to the x and y positionsvoid gotoxy( int x, int y );// Clear Screen to the current color selected by setcolorvoid clrscr();// Simple Print C++ Functionsvoid Print( char* msg, ... );			// Print Stringsvoid Print( char putch );			// Print Charactersvoid Print( int num );				// Print Numbers// data:int cur_cursorX, cur_cursorY;				// this is for keeping track of the text mode cursorstatic unsigned short *vgaadr;				// the VGA addressstatic unsigned textattrib, scrwidth, scrheight;	// the text color, the screen width, & height////////////////////////////////////////////////////////////////////////////////////////////////////////////////*************************************************************************************************************//// Freeze the computer// example: Freeze();void Freeze(){	while( 1 )		;}//*************************************************************************************************************//// Example: Look at printf for more information on how to use this.int doprintf( const char *fmt, va_list args, fnptr_t fn, void *ptr ){	unsigned state, flags, radix, actual_wd, count, given_wd;	unsigned char *where, buf[ PR_BUFLEN ];	long num;	state = flags = count = given_wd = 0;// Begin scanning format specifier list	for ( ; *fmt; fmt++ )	{		switch ( state )		{		// STATE 0: AWAITING %		case 0:			if ( *fmt != '%' )	// not %...			{				fn ( *fmt, &ptr );	// ...just echo it				count++;				break;			}// Found %, get next character and advance state to check if next char is a flag			state++;			fmt++;			// FALL THROUGH			// STATE 1: AWAITING FLAGS ( % - 0 )		case 1:			if ( *fmt == '%' )	// %%			{				fn ( *fmt, &ptr );				count++;				state = flags = given_wd = 0;				break;			}			if ( *fmt == '-' )			{				if ( flags & PR_LJ )	// %-- is illegal					state = flags = given_wd = 0;				else					flags |= PR_LJ;				break;			}// Not a flag char: advance state to check if it's field width			state++;// Check now for '%0...'			if ( *fmt == '0' )			{				flags |= PR_LZ;				fmt++;			}			// FALL THROUGH			// STATE 2: AWAITING (NUMERIC) FIELD WIDTH		case 2:			if ( *fmt >= '0' && *fmt <= '9' )			{				given_wd = 10 * given_wd +					( *fmt - '0' );				break;			}// Not field width: advance state to check if it's a modifier			state++;			// FALL THROUGH			// STATE 3: AWAITING MODIFIER CHARS ( FNlh )		case 3:			if ( *fmt == 'F' )			{				flags |= PR_FP;				break;			}			if ( *fmt == 'N' )				break;			if ( *fmt == 'l' )			{				flags |= PR_32;				break;			}			if ( *fmt == 'h' )			{				flags |= PR_16;				break;			}// Not modifier: advance state to check if it's a conversion char			state++;			// FALL THROUGH// STATE 4: AWAITING CONVERSION CHARS ( Xxpndiuocs )		case 4:			where = buf + PR_BUFLEN - 1;			*where = '\0';			switch ( *fmt )			{				case 'X':					flags |= PR_CA;				// FALL THROUGH// xxx - far pointers (%Fp, %Fn) not yet supported			case 'x':			case 'p':			case 'n':				radix = 16;				goto DO_NUM;			case 'd':			case 'i':				flags |= PR_SG;				// FALL THROUGH			case 'u':				radix = 10;				goto DO_NUM;			case 'o':				radix = 8;// Load the value to be printed. l=long=32 bits:DO_NUM:				if ( flags & PR_32 )					num = va_arg( args, unsigned long );// h=short=16 bits ( signed or unsigned )				else if ( flags & PR_16 )				{					if ( flags & PR_SG )						num = va_arg( args, short );					else						num = va_arg( args, unsigned short );				}// No h nor l: sizeof(int) bits ( signed or unsigned )				else				{					if ( flags & PR_SG )						num = va_arg( args, int );					else						num = va_arg( args, unsigned int );				}// Take care of sign				if ( flags & PR_SG )				{					if ( num < 0 )					{						flags |= PR_WS;						num = -num;					}				}// Convert binary to octal/decimal/hex ASCII// The math here is ALWAYS unsigned				do				{					unsigned long temp;					temp = ( unsigned long ) num % radix;					where--;					if ( temp < 10 )						*where = temp + '0';					else if ( flags & PR_CA )						*where = temp - 10 + 'A';					else						*where = temp - 10 + 'a';					num = ( unsigned long ) num / radix;				}				while ( num != 0 );				goto EMIT;			case 'c':// Disallow pad-left-with-zeroes for %c				flags &= ~PR_LZ;				where--;				*where = ( unsigned char )va_arg(args, unsigned char);				actual_wd = 1;				goto EMIT2;			case 's':// Disallow pad-left-with-zeroes for %s				flags &= ~PR_LZ;				where = va_arg( args, unsigned char * );EMIT:				actual_wd = strlen( ( char* )where );				if ( flags & PR_WS )					actual_wd++;// If we pad left with ZEROES, do the sign now				if ( ( flags & ( PR_WS | PR_LZ ) ) == ( PR_WS | PR_LZ ) )				{					fn( '-', &ptr );					count++;				}// pad on left with spaces or zeroes ( for right justify )EMIT2:				if ( ( flags & PR_LJ ) == 0 )				{					while ( given_wd > actual_wd )					{						fn( flags & PR_LZ ? '0' :							' ', &ptr );						count++;						given_wd--;					}				}// If we pad left with SPACES, do the sign now				if ( ( flags & ( PR_WS | PR_LZ ) ) == PR_WS )				{					fn( '-' , &ptr );					count++;				}// Emit string/char/converted number				while ( *where != '\0' )				{					fn( *where++, &ptr );					count++;				}// pad on right with spaces ( for left justify )				if ( given_wd < actual_wd )					given_wd = 0;				else					given_wd -= actual_wd;				for ( ; given_wd; given_wd-- )				{					fn( ' ', &ptr );					count++;				}				break;			default:				break;			}		default:			state = flags = given_wd = 0;			break;		}	}	return count;}//*************************************************************************************************************//void putch( UCHAR c ){	unsigned att;	att = textattrib << 8;	// backspace	if ( c == 0x08 )	{		if ( cur_cursorX != 0 )			cur_cursorX--;		else if ( cur_cursorX == 0 && cur_cursorY > 0 )		{			cur_cursorY--;			cur_cursorX = scrwidth - 1;	// minus 1 because it'll be off screen or not move if							//  == scrwidth			update_cursor();			return;		}	}	// tab	else if ( c == 0x09 )	{		cur_cursorX += 4;	// tabs are 4 spaces in FOS	}	// carriage return	else if ( c == '\r' )	{		cur_cursorX = 0;	}	// new line	else if ( c == '\n' )		// in FOS, a '\n' is a new line at the start of the line	{		cur_cursorX = 0;		cur_cursorY++;	}	// ASCII characters - 123...abc...	else if ( c >= ' ' )	{		unsigned short *where;		where = vgaadr + ( cur_cursorY * scrwidth + cur_cursorX );		*where = c | att;		cur_cursorX++;	}	if ( cur_cursorX >= scrwidth )	{		cur_cursorX = 0;		cur_cursorY++;	}	update_cursor();}//*************************************************************************************************************//void start_textmode(){	cur_cursorX = 0;	cur_cursorY = 0;	gotoxy( 0, 0 );	vgaadr = ( unsigned short * ) 0xb8000;	textattrib = WHITE_BLACK;		// white on black	scrwidth = 80;	scrheight = 25;}//*************************************************************************************************************//void gotoxy( int x, int y ){        USHORT	position = ( y * scrwidth + x );        // cursor LOW port to vga INDEX register        outportb( 0x3D4, 0x0F );        outportb( 0x3D5, ( UCHAR ) ( position & 0xFF ) );        // cursor HIGH port to vga INDEX register        outportb( 0x3D4, 0x0E );	outportb( 0x3D5, ( UCHAR ) ( ( position >> 8 ) & 0xFF ) );	cur_cursorX = x;	cur_cursorY = y;}//*************************************************************************************************************//void update_cursor(){	gotoxy( cur_cursorX, cur_cursorY );}//*************************************************************************************************************//void setcolor( unsigned color ){	textattrib = color;}//*************************************************************************************************************//void smprintf( char* message ){	char _curchar = *message;	while ( _curchar != '\0' )	{		// don't check if it's greater or = to ' ' because someone might need to print \n and		//  to keep it small, just print all characters		putch( _curchar );		++message;		_curchar = *message;	}}//*************************************************************************************************************//// Example: Look at printf for more information on how to use this function.static int printfhelp( unsigned c, void **ptr ){	putch( c );	return 0;}//*************************************************************************************************************//void printf( const char *msg, ... ){	va_list printfargs;	va_start( printfargs, msg);	( void ) doprintf ( msg, printfargs, printfhelp, NULL );	va_end( printfargs );}//*************************************************************************************************************//// Example: clrscr();		// Clear Screenvoid clrscr(){	// For checking how many times to put blanks	int i;	// Go back to the first place:	GOHOME;	LOOP (  i, scrwidth * scrheight )		putch( ' ' );	// Put the cursor back to the first place	GOHOME;}//*************************************************************************************************************//// NOTE: C++ Code.// Example: Print( "Your Message and % args" );void Print( char* msg, ... ){	va_list args;	va_start( args, msg );	(void)doprintf( msg, args, printfhelp, NULL );	va_end(args);}// Example: Print( 'C' );void Print( char putc ){	putch( putc );}// Example: Print( 1 );void Print( int num ){	printf( "%d", num );}#endif// End of fstdio.h

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆精品视频在线| 丝袜a∨在线一区二区三区不卡| 日韩精品中文字幕在线一区| 欧美在线一区二区| 欧美日韩国产综合久久| 欧美日韩国产一级片| 91精品国产91热久久久做人人| 欧美日韩国产免费| 91精品黄色片免费大全| 91精品午夜视频| 国产亚洲综合色| 欧美国产日韩精品免费观看| 亚洲色图制服丝袜| 亚洲一区二区在线免费看| 爽好久久久欧美精品| 精品在线亚洲视频| 成人a级免费电影| 欧洲一区在线电影| 欧美一二三区精品| 国产午夜精品一区二区三区嫩草| 国产精品国产三级国产三级人妇| 国产精品第13页| 无码av免费一区二区三区试看| 久久99热国产| 色一情一乱一乱一91av| 欧美一级生活片| 国产精品国产a| 午夜视频在线观看一区二区| 国产一区在线看| 色中色一区二区| 欧美精品一区二区三区蜜桃视频| 国产精品久久久久影视| 琪琪一区二区三区| 97超碰欧美中文字幕| 日韩手机在线导航| 亚洲三级电影网站| 韩国毛片一区二区三区| 91视频在线看| 久久嫩草精品久久久精品一| 亚洲一卡二卡三卡四卡无卡久久| 久久国产婷婷国产香蕉| 色综合夜色一区| 久久色中文字幕| 午夜精品免费在线| 99re亚洲国产精品| 2欧美一区二区三区在线观看视频| 亚洲欧美另类小说| 极品少妇一区二区| 在线电影国产精品| 亚洲欧美激情视频在线观看一区二区三区| 午夜视频在线观看一区| caoporn国产一区二区| 精品欧美一区二区三区精品久久| 亚洲欧美日韩系列| 成人精品国产免费网站| 欧美成人一区二区三区在线观看| 亚洲精品国产a| bt7086福利一区国产| 久久久久97国产精华液好用吗| 婷婷丁香激情综合| 日本高清免费不卡视频| 1000部国产精品成人观看| 国产一区二区三区蝌蚪| 日韩精品一区二区三区视频| 亚洲已满18点击进入久久| 91免费小视频| 亚洲女女做受ⅹxx高潮| 97se亚洲国产综合自在线不卡| 国产蜜臀av在线一区二区三区| 狠狠色丁香九九婷婷综合五月| 欧美精品久久99久久在免费线| 亚洲图片欧美色图| 欧美日韩一二三区| 丝袜美腿高跟呻吟高潮一区| 欧美精品在线一区二区三区| 亚洲成人av一区二区三区| 欧美日韩一区二区三区视频| 亚洲一区二区三区在线播放| 欧美日韩激情一区| 日本午夜一区二区| 精品三级av在线| 国产激情偷乱视频一区二区三区| 久久综合色播五月| 懂色一区二区三区免费观看| 中文子幕无线码一区tr| 99精品欧美一区二区蜜桃免费 | 91黄色免费网站| 亚洲最大色网站| 9191成人精品久久| 国产在线看一区| 国产精品毛片久久久久久| 91蜜桃网址入口| 婷婷综合在线观看| 精品免费视频一区二区| 成人免费观看男女羞羞视频| 亚洲精品成人a在线观看| 欧美伦理影视网| 国产寡妇亲子伦一区二区| 国产精品色婷婷| 欧美日韩国产免费| 国产在线观看一区二区| 亚洲视频一区二区在线观看| 在线观看www91| 激情小说欧美图片| 亚洲欧美偷拍另类a∨色屁股| 欧美日韩一区二区三区四区| 国产精品一线二线三线精华| 亚洲精品欧美激情| 精品国产99国产精品| 色婷婷精品久久二区二区蜜臀av| 日本不卡视频在线观看| 国产精品免费视频一区| 欧美精品 国产精品| 国产.欧美.日韩| 丝袜美腿成人在线| 亚洲欧美日韩国产另类专区| 精品理论电影在线观看 | 欧美一区二区三区成人| 成人午夜伦理影院| 美脚の诱脚舐め脚责91| 亚洲香蕉伊在人在线观| 日本一区二区在线不卡| 欧美一二三四在线| 欧美午夜精品电影| 成人性生交大片免费看中文| 麻豆精品一区二区av白丝在线| 一区二区三区欧美| 国产精品萝li| 精品国产成人在线影院| 成人午夜激情片| 看片网站欧美日韩| 亚洲高清不卡在线| 亚洲色欲色欲www| 欧美国产日韩a欧美在线观看 | 欧美视频一二三区| 成人av资源下载| 国产精品一区二区在线观看网站| 天天色图综合网| 亚洲bdsm女犯bdsm网站| 亚洲色大成网站www久久九九| 日本一二三不卡| 久久人人超碰精品| 久久伊人蜜桃av一区二区| 91麻豆精品国产自产在线 | 一区二区三区四区乱视频| 2022国产精品视频| 欧美一区二区观看视频| 欧美三级中文字| 欧美性猛交xxxxxxxx| 一本大道久久a久久综合| 99热这里都是精品| 成人av网站在线| 成人av在线网| www.亚洲人| 91丨九色丨国产丨porny| 一本高清dvd不卡在线观看| 色综合一个色综合| 精品视频资源站| 正在播放亚洲一区| 精品福利一二区| 国产精品美女久久久久久 | 五月激情综合婷婷| 日韩一区精品视频| 蜜臀精品久久久久久蜜臀 | 97aⅴ精品视频一二三区| 91性感美女视频| 欧美最新大片在线看| 欧美精品在线视频| 欧美mv日韩mv国产网站app| 久久久国产一区二区三区四区小说| 国产三区在线成人av| 中文字幕av资源一区| 亚洲综合在线观看视频| 首页国产丝袜综合| 国产福利一区二区三区| 91免费版在线| 欧美一区二区三区色| 日本一区二区三级电影在线观看 | 日韩午夜激情电影| 日本一区二区三区高清不卡| 亚洲在线中文字幕| 国产永久精品大片wwwapp| 91浏览器在线视频| 日韩你懂的在线播放| 中文字幕日本不卡| 久久国内精品自在自线400部| 白白色 亚洲乱淫| 91麻豆精品国产综合久久久久久 | 亚洲国产精品影院| 国产精品一二三在| 欧美午夜精品久久久久久孕妇| 日韩欧美一区电影| 一区二区三区精品久久久| 精品一区免费av| 欧美无砖砖区免费| 日本一区二区三区免费乱视频| 视频在线在亚洲| av一区二区三区| 久久男人中文字幕资源站| 首页亚洲欧美制服丝腿|