CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - main.c
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Sub Category
assembly language
SCSI-ASPI
ELanguage
Disk Tools
Speech/Voice recognition/combine
Editor
Anti-virus
MultiLanguage
MPI
source in ebook
Delphi VCL
OS Develop
MiddleWare
MacOS develop
LabView
e-language
python
Search - main.c - List
[
Other
]
221东南大学
DL : 0
首先,分别对8255、8253进行初始化,设置8255为A口、C口输出,设置8253的计数器0为工作模式3;其次,设置IRQ7的中断矢量,使得有IRQ7中断时调用SERVER;再次,调用INIT对计数值初始化;最后,主程序循环等待中断,开始秒表的计时。 2、 INIT子程序-First, the 8255,8253 initialization, set for the 8255 A-C mouth output, set 8253 as the Counter mode 0 3; Second, set up the interruption vector there, make it there interruption call SERVER; Again, call curl_setopt early to count before; Finally, the cycle of waiting for the main program interruption began stopwatch time. 2, curl_setopt Subroutine
Date
: 2008-10-13
Size
: 15.01kb
User
:
孙媳妇
[
Other
]
GaussElimination
DL : 0
Gauss列主消元法,用于求解线性方程组,c代码。-Gauss out the main elimination method for solving linear equations, c code.
Date
: 2008-10-13
Size
: 6.67kb
User
:
杨祎
[
Other
]
TwoMain
DL : 0
自解密的加密程序的制作,是为了保证自己的数据不被别人非法地窃取,有必要对数据文件进行适当地加密。本程序采取一定的算法,对密码和数据进行加密,生成一个自解密的EXE文件。这个自解密文件是由两部分组成的。第一部分为可执行代码部分,其作用是对密码进行判断,对数据进行解密;后一部分是被加过密的密码和数据。 本程序分两个模块进行编写。第一个是main.c,它是用来进行加密,产生EXE文件的;第二个是main2.c,它是用来解密的。分别对它们进行编译生成main.exe和main2.exe,再对其进行合并即可。 合并方法如下: COPY /B main.EXE+main2.EXE Key.EXE(注意main.EXET和main2.EXE的顺序) 使用时请按下列格式键入。 Key〈欲加密文件〉〈产生后的EXE文件名〉 按提示输入密码后将生成指定的可执行文件。解密时运行这个可执行文件。输入密码后(若输入三次都不正确,将退出解密程序),即把原文件内容还原到你指定的文件中。解密程序格式如下。 可执行文件名 (filename) 第一个源代码文件 main.c 第二个源代码文件main2.c 上述程序在TC2.0集成环境里通过 -since declassified encryption program production, in order to ensure that their data is not illegal to steal other people, it is necessary to conduct appropriate data file is encrypted. This program will adopt the algorithm, the passwords and data encryption, generating an EXE from the declassified documents. Since this document was declassified by the two components. The first part of the executable code, and its role is to password judgment, the data decryption; The latter part is additionally dense passwords and data. The procedure for the preparation of two modules. The first one is main.c, it is used for encryption, generated EXE file; The second is main2.c. it is used declassified. They were compiled and main2.exe main.exe generation, and its merger can be. The merger is as follows :
Date
: 2008-10-13
Size
: 1.6kb
User
:
wwwwppp
[
Other
]
2006050302584118755
DL : 0
一个简单的字典工具(C++源码) 目前实现的主要功能: 1.制作字典 1.1 向导模式 1.2 自定义模式 2.对字典进行加工 2.1 给字典中的密码添加前缀 2.2 给字典中的密码添加后缀 2.3 合并多个字典 一些工具仅支持单个字典 2.4 过滤指定字典中的重复密码 合并后的字典可能会出现重复密码 如果处理比较大的字典 由于未使用多线程处理 速度会比较慢 尤其体现在过滤功能上 因为没想到更好的算法 之所以用C++而不是C来实现 是因为C++的I/O流与C的I/O函数相比 更强大易用和安全 不过相应的缺点是效率要低一点 -a simple dictionary tools (C source code) to achieve the main functions : 1. Wizard production model dictionary 1.1 1.2 2-defined pattern. dictionary of processing 2.1 to the dictionary passwords add prefix 2.2 to the dictionary passwords suffixes 2.3 consolidation dictionary tools only support a single dictionary 2 .4 filter specified dictionary of duplication after the merger password dictionary may be repeated password if handled fairly large dictionary failure to use multi-threaded processing speed will be slow especially in the filter functions as never thought that the algorithm has better use C and C was not achieved because C of I / O streams and C of I / O function compared to more powerful but easy-to-use and the corresponding security weakness is to lower efficiency
Date
: 2008-10-13
Size
: 1.45kb
User
:
linguohua
[
Other
]
huffmanfordepreesingcoding
DL : 0
哈夫曼(Huffman)编码压缩和解压缩程序 huffman.c 主要的功能模块 bitio.c/bitio.h 一些支撑函数,支持以比特(bit)为单位的文件I/O 用法: 压缩 huffman E <in-file> <out-file> 解压缩 huffman D <in-file> <out-file> 压缩时,读入<in-file>中内容,建立Huffman编码,将结果存入<out-file>中,得到压缩文件。 解压缩时,读入<in-file>中内容,恢复Huffman编码,将结果存入<out-file>中,得到原文件。 本代码在linux+gcc/windows+vc下经过测试,为了使读者容易理解算法本身, 算法实现中仅采用了简单的错误处理机制和优化。-Huffman (Huffman) encoding compression and decompression procedures huffman.c main functions module bitio.c / bitio.h some support function, support for bits (bit) for the File I / O usage : Huffman compression E
Date
: 2008-10-13
Size
: 1.7kb
User
:
冯灿科
[
Other
]
shuzhifenxikechengsheji
DL : 0
本程序代码是用c/c++编写的,主要功能是实现多项式的加、减、乘、除,采用指针和链表,算法参考了其他书上的,但是代码全部是由自己写的,只是在出错处理上不是太严格-the code is c / c prepared by the main function is a polynomial, plus or minus, multiplication and addition, Listless and indicators used, the algorithm as a reference book, but all the code is written by ourselves, the only error handling is not too strict
Date
: 2008-10-13
Size
: 3.13kb
User
:
超哥
[
Other
]
200505042215343226
DL : 0
小的飞机订票系统,主要应用了Visual c/c++,初次尝试,请多多指教-small plane reservation systems, the main application of Visual c / c, the initial attempt, you will enlighten
Date
: 2008-10-13
Size
: 10.62kb
User
:
陈伟良
[
Other
]
vc-tongxunlu
DL : 0
本程序是电话薄管理系统,VC++开发,主要功能为:添加新用户资料,修改现有用户资料,按姓名查询修改会员信息,按电话号码查询修改会员信息,显示全部信息,用电话号码查询,用会员姓名查询,删除现有用户资料.是一个不错的c课程设计.-phone book management system, VC + + development, the main functions : add new user information, modification of existing users, by name query modification member information by telephone directory inquiry changes Member information, All the information, telephone numbers inquiries, inquiries with member's name, delete the existing user information. Is a good c curriculum design.
Date
: 2008-10-13
Size
: 9.01kb
User
:
王雨
[
Other
]
sousuo
DL : 0
一个c++程序,主要功能是人工智能中的深度优先遍历和广度优先遍历,用链表实现。-a c procedures, artificial intelligence is the main function of depth-first traversal and breadth priority traversal using chain to achieve.
Date
: 2008-10-13
Size
: 1.66kb
User
:
赵鹏
[
Other
]
MAIN.RAR
DL : 0
简单的C语言的学生信息管理程序,用torboC 来运行
Date
: 2008-10-13
Size
: 2.7kb
User
:
lun
[
Other
]
main
DL : 0
龟兔赛跑 一个学习c语言的例程,我按照一本经典c教程算法编写,演示了龟兔赛跑的过程,结果是随机出来的。很有趣味性
Date
: 2008-10-13
Size
: 709byte
User
:
张欢
[
Other
]
MinExe
DL : 0
这是一个最小化的VC6.0编译的程序,其实VC程序的真正入口点不是在WinMain\\main,而是WinMainCRTStartup\\MainCRTStartup,这个函数的主要功能是检索命令行,环境变量,初始化全局变量和一些底层函数的堆栈,还有就是对构造C++全局对象.如果我们的程序没有用到这些,我们可以重写这个函数,省去了原来的一大堆代码,这样我们的程序的体积就减少了很多了.有兴趣的可以试一下.
Date
: 2008-10-13
Size
: 2.57kb
User
:
THM
[
Other
]
adventure
DL : 1
初学C++时的一个小程,古堡救美游戏,输入命令指引hero探险,遇到princess胜利,遇到monster结束,主要为了熟悉c++,熟悉oop思想 The program is debugged on the plat of VC 6.0 其主体结构为: int main() { Welcome() while(1) { Adventure() //游戏主体 cout<<endl<<\"Do you wanna to try it again (Yes / No) :\" cin>>Choice if(choice is not yes) //判断用户是否要继续游戏 break } return 0 int adventure() { While (1){ Command() //分析输入命令,进入下一个房间 If(meet monster) Break //gameover If (meet princess) Cout<<”you have meet the princess ,take her to a safe place”<<endl If (meetprincess && currentinlobby) Win() //win the game } }
Date
: 2008-10-13
Size
: 3.87kb
User
:
声明者
[
Other
]
Lua-5
DL : 1
Lua 是一个扩展式程序设计语言,它被设计成支持通用的过程式编程,并有相关数据描述的设施。 Lua 也能对面向对象编程,函数式编程,数据驱动式编程提供很好的支持。它可以作为一个强大、轻量的脚本语言,供任何需要的程序使用。 Lua 以一个用 clean C 写成的库形式提供。(所谓 Clean C ,指的 ANSI C 和 C++ 中共通的一个子集) 作为一个扩展式语言,Lua 没有 \"main\" 程序的概念:它只能 嵌入 一个宿主程序中工作,这个宿主程序被称作 embedding program 或简称为 host 。宿主程序可以通过调用函数执行一小段 Lua 代码,可以读写 Lua 变量,可以注入 C 函数让 Lua 代码调用。这些扩展的 C 函数,可以大大的扩展了 Lua 可以处理事务的领域,这样就可以订制出各种语言,而它们共享一个统一的句法格式的框架。 Lua 的官方发布版就包含了一个叫做 lua 的简单的宿主程序,它用 Lua 库提供了一个保证独立的 Lua 解释器。 Lua 是一个自由软件,它的使用许可决定了对它的使用过程一般没有任何保证。这份手册中描述的东西的实现,可以在 Lua 的官方网站 www.lua.org 找到
Date
: 2008-10-13
Size
: 106.65kb
User
:
yunjianzhang
[
Other
]
gedebahe
DL : 0
public class gedebahe { public static void main( String [] args) { for ( ) { int a=-1,b,c //b,c是分解出来的两个数 System.out.print(\"Please input a oushu:\") //输入一个偶数 try { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)) String inputLine = in.readLine() a = Integer.valueOf(inputLine).intValue() }catch (Exception exc) { System.out.println(\"Sorry,please input a number.\") return } if (a%2!=0) { System.out.println(\"Sorry,please input a oushu.\") return } for (b=1 b<a b++) { c=(a-b) if(isPrime(b)&&isPrime(c)) { System.out.println(a+\"=\"+b+\"+\"+c) break } } } } public static boolean isPrime(int k)//方法用来判断一个数是否为偶数 { int a boolean t = true if (k==1) return t for (a=2 a<k a++) { if (k%a==0) break } if (a!=k) t=false return t-gedebahe public class (public static void main (String [] args) (for () (int a = a, b, c / / b, c is the decomposition of the two several System.out.print ( "Please input a oushu : ") / / input an even try (BufferedReader in = new BufferedReader (new InputStreamReader (System.in)) = String inputLine in.readLine () a = Integer.valueOf (inputLine). intValue ()) catch (Exception exc) ( System.out.println ( "Sorry, please input a number.") return) if (a 2%! = 0) (System.out.println ( "Sorry, please input a oushu.") return) for (b = a blt; a b) (c = (a-b) if (isPrime (b) isPrime (c)) (System.out.println (a "=" b "" c) break)))) public static boolean isPrime (int k) / / method used to determine whether a number is even (int a boolean true if t =
Date
: 2008-10-13
Size
: 881byte
User
:
康健伟
[
Other
]
canf18xx8.h
DL : 21
、 先在microchip网站上找到00738.zip,这个包中有 can18xx8.h,can18xx8.c,将其复制到一个你要编写程度的子目录中,例如C:\testcan下,这个时候这个东东是不能直接用的。 2、 下载一个MPLAB 7.10,直接安装(要求直接下载) 3、 再下载一个PICC18 (HI-TECH的),要正版哦(支持正版,买不起的想其它办法吧) 4、在你的头文件上写上如下的样式: #include "stdio.h" #include "can18xx8.h" #include "pic18fxx8.h"//可能是“pic.h”不太好包含,因此常会报错,直接包含克服之 5、然后设置好PICC和MPLAB,如果MPLAB上没有PICC18,则到PICC的网上下一个安装软件,可以直接运行安装就有了。 6、按照工程的基本要求把你的源代码、添加上两个库(不加也可以) 然后就可以写如下代码了:下面是一个完整版,可以直接使用microchip的库函数,本程序只是仿真调试过,未在多个芯片通信过,仍在制作中。 #include "stdio.h" #include "can18xx8.h" #include "pic18fxx8.h" unsigned long NewMessage; BYTE NewMessageData[8]; BYTE MessageData[8]; BYTE NewMessageLen; enum CAN_RX_MSG_FLAGS NewMessageFlags=1; BYTE RxFilterMatch; void main() { //int a; //int b; CANInitialize(1, 5, 7, 6, 2, CAN_CONFIG_VALID_XTD_MSG); while(1) { // Application specific logic here // Check for CAN message if ( CANIsRxReady() ) { CANReceiveMessage(&NewMessage,NewMessageData,&NewMessageLen,&NewMessageFlags); if ( NewMessageFlags & CAN_RX_OVERFLOW ) { // Rx overflow occurred; handle it } if ( NewMessageFlags & CAN_RX_INVALID_MSG ) { // Invalid message received; handle it } if ( NewMessageFlags & CAN_RX_XTD_FRAME ) { // Extended Identifier received; handle it } else { // Standard Identifier received. } if ( NewMessageFlags & CAN_RX_RTR_FRAME ) { // RTR frame received } else { // Regular frame received. } // Extract receiver filter match, if it is to be used RxFilterMatch = NewMessageFlags & CAN_RX_FILTER_BITS; } // Process received message // Transmit a message due to previously received message or // due to application logic itself. if ( CANIsTxReady() ) { MessageData[0] = 0x01; CANSendMessage( 0x02,MessageData,1,CAN_TX_PRIORITY_0 &CAN_TX_STD_FRAME & CAN_TX_NO_RTR_FRAME); } // Other application specific logic } // Do this forever // End of program } 以上均是参考文档并进行了修正,由于中间总是报错,为了大家让CAN更容易,谢谢大家!
Date
: 2009-05-25
Size
: 10.43kb
User
:
lovelzs2008@126.com
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.