test01.c

来自「一个免费的SMART CARD OS系统。」· C语言 代码 · 共 70 行

C
70
字号
/* ============================================================================   Project Name : jayaCard TCK   Module Name  : proto/tck/bios/test01/test01.c   Version : $Id: test01.c,v 1.6 2004/03/07 10:43:24 dgil Exp $	Description: BIOS TEST01 - RANDOM GENERATOR    The Original Code is jayaCard TCK code.    The Initial Developer of the Original Code is Gilles Dumortier.	Portions created by the Initial Developer are Copyright (C) 2002-2004 the    Initial Developer. All Rights Reserved.    Contributor(s):	Permission is granted to any individual to use, copy, or redistribute	this software so long as all of the original files are included	unmodified, that it is not sold for profit, and that this copyright	notice is retained.    This program is distributed in the hope that it will be useful,    but WITHOUT ANY WARRANTY; without even the implied warranty of    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   History Rev	Description   040603 dgil	wrote it from scratch   ============================================================================*/#include "precomp.h"/* ============================================================================	globals   ========================================================================= */int	nRand = 10;/* ============================================================================	main()   ========================================================================= */int main(int argc, char ** argv){	if (argc > 1 && atoi( argv[1] ) ) {		nRand = atoi( argv[1] );	}	printf("Start of bios::test01\n");	LOG_DISABLE("HAL");	LOG_DISABLE("BIOS");	LOG_DISABLE("EEPROM");	BIOS_INIT();	while (nRand>0) {		gGlobalSem = JSEC_OK;		nRand--;		gGlobalSem++;		BIOS_RANDOM();		printf("%.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X  gGlobalSem=%.2X lasterr=%d\n",u.bBlock[0],u.bBlock[1],u.bBlock[2],u.bBlock[3],u.bBlock[4],u.bBlock[5],u.bBlock[6],u.bBlock[7],gGlobalSem,lasterr);	}	printf("End of bios::test01\n");	return 0;}

⌨️ 快捷键说明

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