Welcome![Sign In][Sign Up]
Location:
Search - c byte int

Search list

[assembly languageshizh

Description: 这个时钟程序是我在1993年编的一个小程序,现在贴出来给大家做参考,它执行后驻留内存,到整点时会报时,你可以用 Ctrl-Alt-U 把它从内存中下掉,可以用 Ctrl-Alt-C 变换颜色,用 Ctrl-Alt-O 把报时声音关掉(如果感到讨厌的话),在驻留内存时,用了直接改内存控制块的方法,所以用 MEM 或 MI 无法在内存中看到它,键盘控制用了直接截取 INT 9 的方法。 这个程序虽然很小,编译后才1K多一点点字节,但是麻雀虽小,五脏俱全,在这个程序中,你可以参考到以下编程方法:如何驻留内存;如何截取中断向量;如何在硬件层次上应答键盘;如何截取组合键。 要编译、连接成*.com文件-this my clock procedures in 1993 a series of small programs, is now posted out to you for reference. following the implementation of its presence memory, the whole point of the talks will be, you can use Ctrl-Alt-U from its memory under the swap. can use Ctrl-Alt-C transform color, using Ctrl-Alt-O put timekeeping voice switch off (if the annoyance), in the presence of memory, using a direct change memory control block in the way that they use MEM or MI in the memory not see it, keyboard control using a direct interception of the INT 9. This procedure Despite its small size, after compiling a little more than 1K byte, but Sparrow small, perfectly formed, in the process, you can refer to the following program : how the presence of memory; how interception interrupt vector; in response le
Platform: | Size: 3116 | Author: 黄文欢 | Hits:

[Windows Develop征服4.0马端源码

Description: using System; using System.Collections.Generic; using System.Text; namespace NewestCOServer { public class Cryption { class CryptCounter { UInt16 m_Counter = 0; public byte Key2 { get { return (byte)(m_Counter >> 8); } } public byte Key1 { get { return (byte)(m_Counter & 0xFF); } } public void Increment() { m_Counter++; } } private CryptCounter _decryptCounter; private CryptCounter _encryptCounter; private byte[] _cryptKey1; private byte[] _cryptKey2; private byte[] _cryptKey3; private byte[] _cryptKey4; private bool Decrypt2 = false; public Cryption() { _decryptCounter = new CryptCounter(); _encryptCounter = new CryptCounter(); _cryptKey1 = new byte[0x100]; _cryptKey2 = new byte[0x100]; byte i_key1 = 0x9D; byte i_key2 = 0x62; for (int i = 0; i 4 | buffer[i] < 4 | buffer[i] < 4 | buffer[i] << 4); buffer[i] ^= (byte)(_cryptKey4[_decryptCounter.Key2] ^ _cryptKey3[_decryptCounter.Key1]); _decryptCounter.Increment(); } } } public void GenerateKeys(UInt32 CryptoKey, UInt32 AccountID) { UInt32 tmpkey1 = 0, tmpkey2 = 0; tmpkey1 = ((CryptoKey + AccountID) ^ (0x4321)) ^ CryptoKey; tmpkey2 = tmpkey1 * tmpkey1; _cryptKey3 = new byte[256]; _cryptKey4 = new byte[256]; for (int i = 0; i < 256; i++) { int right = ((3 - (i % 4)) * 8); int left = ((i % 4)) * 8 + right; _cryptKey3[i] = (byte)(_cryptKey1[i] ^ tmpkey1 left); _cryptKey4[i] = (byte)(_cryptKey2[i] ^ tmpkey2 left); } Decrypt2 = true; } public void GenerateKeys2(byte[] InKey1, byte[] InKey2) { byte[] addKey1 = new byte[4]; byte[] addKey2 = new byte[4]; byte[] addResult = new byte[4]; //addKey1.i = 0; //addKey2.i = 0; byte[] tempKey = new byte[4]; long LMULer; // InKey1[0] = 0x20; // InKey1[1] = 0x5c; // InKey1[2] = 0x48; // InKey1[3] = 0xf4; // InKey2[0] = 0x00; // InKey2[1] = 0x44; // InKey2[2] = 0xa6; // InKey2[3] = 0x2e; //if (Key3) delete [] Key3; //if (Key4) delete [] Key4; _cryptKey3 = new byte[256]; _cryptKey4 = new byte[256]; for (int x = 0; x < 4; x++) { addKey1[x] = InKey1[3 - x]; addKey2[x] = InKey2[3 - x]; } //cout << "Key1: " << addKey1.i << endl; //cout << "Key2: " << addKey2.i << endl; uint Adder1; uint Adder2; uint Adder3; Adder1 = (uint)((addKey1[3] << 24) | (addKey1[2] << 16) | (addKey1[1] << 8) | (addKey1[0])); Adder2 = (uint)((addKey2[3] << 24) | (addKey2[2] << 16) | (addKey2[1] 8) & 0xff); addResult[2] = (byte)((Adder3 >> 16) & 0xff); addResult[3] = (byte)((Adder3 >> 24) & 0xff); for (int b = 3; b >= 0; b--) { // printf("%.2x ", addResult.c[b]); tempKey[3 - b] = addResult[b]; } tempKey[2] = (byte)(tempKey[2] ^ (byte)0x43); tempKey[3] = (byte)(tempKey[3] ^ (byte)0x21); for (int b = 0; b < 4; b++) { tempKey[b] = (byte)(tempKey[b] ^ InKey1[b]); } //Build the 3rd Key for (int b = 0; b < 256; b++) { _cryptKey3[b] = (byte)(tempKey[3 - (b % 4)] ^ _cryptKey1[b]); } for (int x = 0; x < 4; x++) { addResult[x] = tempKey[3 - x]; } Adder3 = (uint)((addResult[3] << 24) | (addResult[2] << 16) | (addResult[1] << 8) | (addResult[0])); LMULer = Adder3 * Adder3; LMULer = LMULer 32; Adder3 = Convert.ToUInt32(LMULer & 0xffffffff); addResult[0] = (byte)(Adder3 & 0xff); addResult[1] = (byte)((Adder3 >> 8) & 0xff); addResult[2] = (byte)((Adder3 >> 16) & 0xff); addResult[3] = (byte)((Adder3 >> 24) & 0xff); for (int b = 3; b >= 0; b--) { tempKey[3 - b] = addResult[b]; } //Build the 4th Key for (int b = 0; b < 256; b++) { _cryptKey4[b] = Convert.ToByte(tempKey[3 - (b % 4)] ^ _cryptKey2[b]); } Decrypt2 = true; //cout << "Int representation: " << charadd.i << endl; } } }
Platform: | Size: 3638778 | Author: andesion@vip.qq.com | Hits:

[Othercanf18xx8.h

Description: 、 先在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更容易,谢谢大家!
Platform: | Size: 10682 | Author: lovelzs2008@126.com | Hits:

[assembly languageshizh

Description: 这个时钟程序是我在1993年编的一个小程序,现在贴出来给大家做参考,它执行后驻留内存,到整点时会报时,你可以用 Ctrl-Alt-U 把它从内存中下掉,可以用 Ctrl-Alt-C 变换颜色,用 Ctrl-Alt-O 把报时声音关掉(如果感到讨厌的话),在驻留内存时,用了直接改内存控制块的方法,所以用 MEM 或 MI 无法在内存中看到它,键盘控制用了直接截取 INT 9 的方法。 这个程序虽然很小,编译后才1K多一点点字节,但是麻雀虽小,五脏俱全,在这个程序中,你可以参考到以下编程方法:如何驻留内存;如何截取中断向量;如何在硬件层次上应答键盘;如何截取组合键。 要编译、连接成*.com文件-this my clock procedures in 1993 a series of small programs, is now posted out to you for reference. following the implementation of its presence memory, the whole point of the talks will be, you can use Ctrl-Alt-U from its memory under the swap. can use Ctrl-Alt-C transform color, using Ctrl-Alt-O put timekeeping voice switch off (if the annoyance), in the presence of memory, using a direct change memory control block in the way that they use MEM or MI in the memory not see it, keyboard control using a direct interception of the INT 9. This procedure Despite its small size, after compiling a little more than 1K byte, but Sparrow small, perfectly formed, in the process, you can refer to the following program : how the presence of memory; how interception interrupt vector; in response le
Platform: | Size: 3072 | Author: 黄文欢 | Hits:

[JSP/JavaGeneratePossionDistribution_codes

Description: Generate Possion Dis. step1:Generate a random number between [0,1] step2:Let u=F(x)=1-[(1/e)x] step3:Slove x=1/F(u) step4:Repeat Step1~Step3 by using different u,you can get x1,x2,x3,...,xn step5:If the first packet was generated at time [0], than the second packet will be generated at time [0+x1],The third packet will be generated at time [0+x1+x2], and so on …. Random-number generation 1.static method random from class Math -Returns doubles in the range 0.0 <= x < 1.0 2.class Random from package java.util -Can produce pseudorandom boolean, byte, float, double, int, long and Gaussian values -Is seeded with the current time of day to generate different sequences of numbers each time the program executes-Generate Possion Dis. step1:Generate a random number between [0,1] step2:Let u=F(x)=1-[(1/e)x] step3:Slove x=1/F(u) step4:Repeat Step1~Step3 by using different u,you can get x1,x2,x3,...,xn step5:If the first packet was generated at time [0], than the second packet will be generated at time [0+x1],The third packet will be generated at time [0+x1+x2], and so on …. Random-number generation 1.static method random from class Math -Returns doubles in the range 0.0 <= x < 1.0 2.class Random from package java.util -Can produce pseudorandom boolean, byte, float, double, int, long and Gaussian values -Is seeded with the current time of day to generate different sequences of numbers each time the program executes
Platform: | Size: 155648 | Author: 黃文岩 | Hits:

[JSP/Javawangjiansenjiaocai

Description: Java平台的划分 要彻底了解Java 2 Micro Edition,我们必须先对Java 2 Micro Edition在整个Java技术之中的定位做个了解。 一般我们在撰写C程序的时候,会使用C标准程序库;使用C++撰写程序的时候,会使用C++标准程序库;而使用Java撰写程序的时候,则使用Sun所提供的Java标准类库。之所以叫做类库,是因为各式各样的方法(method,也可以叫做“函数”)被有系统地放在类之中,而这些类又被分门别类地归属在不同的包(package)之下,相较起来,传统标准程序库(例如Win32 API)的组成结构就显得有点松散。 这些各式各样的包(package),组成了所谓的核心类库(Core Class,即java.*),在核心类库之外还有所谓的扩充类库(Extended Class,即javax.*)。程序员可以自由选用各种程序库来完成自己的工作。 Java语言还支持8种基本类型(primitive type,即boolean、byte、short、int、long、float、double),可供程序员撰写程序时使用。根据所支持的基本类型,以及对这些核心和扩充类库所支持的程度,Sun Microsystems区分出四种不同的Java平台,如图1-1所示。-By Java Platform To thoroughly understand the Java 2 Micro Edition, we must first of the Java 2 Micro Edition Java technology into the entire understanding of the positioning to be. In general we write a C program, will use the C standard library using C++ written program, will use the C++ Standard Library and use Java to write programs when you use the Sun provided by the Java standard library. The reason is called the library, because a variety of methods (method, also called a "function") have been systematically put into classes, which classes they are categorized in a different package ownership (package) s under comparison, the traditional standard library (such as Win32 API) of the structure becomes a bit loose. These kinds of packages (package), form the so-called core class libraries (Core Class, the java .*), there are the so-called outside of the core library extension library (Extended Class, or javax .*) . Programmers are free to choose a variety of library to comp
Platform: | Size: 7766016 | Author: zhaolulu | Hits:

[Crack HackFlieList

Description: 用的C++语言。因为前阵子需要大批量修改不同文件夹下同一个配置文件里的某一个位置信息(我要修改的文件:PlatForm),因为配置文件加密成十六进制,而且不知道结构体,根据字节对齐,我模糊判断要修改位置为INT类型,所以只能从内存直接拷贝修改。包括遍历文件夹寻找文件和内存拷贝修改操作,如果要批量修改文件名字或者之类的原理是一样的不打算做其他修改了,仅供参考。-With the C++ language. A while back, need to change because of large quantities of a different folder, the same below a certain configuration file location information (I want to modify the file: PlatForm), because the configuration file encryption to hex, but do not know the structure, according to the byte alignment, I judge to modify the position of fuzzy INT type, we can only modify the copy directly from memory. Including through the folder for files and modify memory copy operation, if you want to batch change file name or the same kind of principle is not going to do other changes, and for reference only.
Platform: | Size: 966656 | Author: | Hits:

[Software EngineeringC

Description: 1.1 C基础知识 1 1.2 函数与头文件 2 1.3 C预处理器 3 1.4 将一个字符转换为long型 4 1.5 strcpy函数 4 1.6 assert用法 5 1.7 itoa函数和atoi函数 6 1.8 strcmp函数实现 8 1.9 strcpy函数实现 9 1.10 memcpy函数实现 10 1.11 memcpy和memmove函数的实现 11 1.12 strcat函数实现 13 1.13 使用库函数atoi,将char *→int 13 1.14 使用库函数itoa,将int→char * 14 1.15 不使用库函数,将int→char * 14 1.16 不使用库函数,将char *→int 15 1.17 求两个整数的最大公约数 16 1.18 Little_endian or Big_endian 17 1.19 sizeof与strlen的区别 19 1.20 实现String类的BIG_FOUR 19 1.21 struct和union的区别 20 1.22 char字符变量与int整型数据 22 1.23 字,字节,字符,比特 23 1.24 空格、空字符、字符数组结束符的区别 25-1.1 C Basics 1 1.2 Functions and header files 2 1.3 C preprocessor 3 1.4 will be a long-type characters into four 1.5 strcpy function 4 1.6 assert usage 5 1.7 itoa function and atoi function 6 1.8 strcmp function to achieve 8 1.9 strcpy function to achieve 9 1.10 memcpy function to achieve 10 Achieve 11 1.11 memcpy and memmove function 1.12 strcat function to achieve 13 1.13 using the library function atoi, the char* → int 13 1.14 using the library function itoa, the int → char* 14 1.15 does not use the library function, int → char* 14 1.16 does not use the library function, char* → int 15 1.17 find the greatest common divisor of two integers 16 1.18 Little_endian or Big_endian 17 Difference 1.19 sizeof and strlen 19 1.20 realize BIG_FOUR String class 19 Difference 1.21 struct and union of 20 1.22 char and int integer variable character data 22 1.23 word, byte, character, bit 23 Difference 1.24 spaces, null characters, character array termi
Platform: | Size: 142336 | Author: 唐进 | Hits:

[CSharpOffsetTool

Description: c#写的完美国际多级偏移地址搜索工具,支持Byte Array、String、int、float等格式-c#写的完美国际偏移地址搜索工具,支持Byte Array、String、int、float等格式
Platform: | Size: 86016 | Author: | Hits:

[Linux-Unixpngwutil

Description: Place a 16-bit number into a buffer in PNG byte order. The parameter is declared unsigned int, not png_uint_16, just to avoid potential problems on pre-ANSI C compilers.
Platform: | Size: 19456 | Author: hingcxdao | Hits:

[Otherep1

Description: C++编程(面向对象程序设计)第一次试验上机答案,北京理工大学-1. Read the codes carefully on page 230 and page 248 of the book, or on page 247 and page 266 of the electronic book, then answer the questions as below: 1.1 Describe the main data structure of Stack; 1.2 Describe the differences in the data storage of Stash and Stack. Notice: You can answer in English or Chinese. 2. Create a program that opens a text file in English and counts the words number in that file. 3. Define an array of int. Take the starting address of that array and use static_cast to convert it into and void*. Write a function that takes a void*, a number(indicating a number of bytes), and a value(indicating the value to which each byte should be set) as arguments. The function should set each byte in the specified range to the spcified value. Try out the function on your array of int. 4. Create a class Point, and finish the following functions as below: 4.1 Define two member variables, coordX and coordY
Platform: | Size: 12288 | Author: 刘晶晶 | Hits:

[Embeded-SCM Developc51_stepMotor

Description: c51驱动步进马达的电路和程序代码 #include c:\mc51\8051io.h /* include i/o header file */ #include c:\mc51\8051reg.h register unsigned char j,flag1,temp; register unsigned int cw_n,ccw_n; unsigned char step[8]={0x80,0xc0,0x40,0x60,0x20,0x30,0x10,0x90} #define n 400 /* flag1 mask byte 0x01 run cw() 0x02 run ccw() */(c51 drive stepper motor circuit and code)
Platform: | Size: 34816 | Author: ottkrce | Hits:

CodeBus www.codebus.net