找了好久才找到的
printerapp_200_win2kxp
......
Read more
以前刷机,电脑上没有并口,主板上的接口,买了个扩展口。信息用TTL看usb 2303的TTL小板。想用开发板上的串口,再来看主板,也留有接口,没面板,等不着买了,自己做了一个,看主板说明书,微星785GTM-E45主板上的接口定义与串口是1,1对应该的也就是1->1 , 2->2 .....从以前的废主板上拆下串口,以前的PCI串卡的面板拆了下来,结合在一起。做了一个上图。
......
Read more
Read more
晕菜到家了,买了jlink没买转换板,发的6410的版是2.0间距的10p的口,在淘宝上买板,这不是放假人家不发货,而且还没线卖,我要板没线还是用不了。一气之下,自己做了一条转换线。10p FC头,是以前买来做jtag线用的,20p fc头没有,用的dma33的ide线的头,拆了,锯开,打磨,用502粘上的,10p 2.54转2.0是用从老的磨托罗拉的BP机的板子上拆下来的单排母口做的,哈哈。接口定义如下,上图.留给有用的朋友
s3c_641......
Read more
Read more
上课的地方arp横行,总是上不去网。
研究了一下arp功击的代码。总用更高的频率来解决功击网关的问题,失败告终。
抓包
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <string.h>
#include <linux/if_packet.h>
#include <linux/if_ether.h>
#include <arpa/inet.h>
#include <net/if.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <unistd.h>
......
Read more
Read more
#include <stdio.h>
struct point {
int row;
int col;
};
/* define point stack */
struct point stack[512];
/* define stack pointer */
int top = 0;
/* define push() */
void push(struct point node)
{
stack[top++] = node;
return;
}
/* define pop() */
struct point pop(void)
{
return stack[--top];
}
/* define isempty() */
int isempty(void)
{
return (top == 0);
}
in......
Read more
Read more
#include <stdio.h>
int bubble(int *a,int len)
{
int i,j;
for(i=0;i<len-1;i++){
for(j=0;j<len-i-1;j++){
if(a[j]>a[j+1]){
a[j]^=a[j+1];
a[j+1]^=a[j];
......
Read more
Read more
#include <stdio.h>
#define LEN 8
int a[LEN]={5,2,4,7,1,3,2,6};
void merge(int start,int mid,int end)
{
int n1=mid-start+1;
int n2=end-mid;
int left[n1],right[n2];
int i,j,k;
for(i=0;i<n1;i++)
left[i]=a[start+i];
for(j=0;j<n2;j++)
right[j]=a[mid+j+1];
i=j=0;
for(k=start;i &......
Read more
Read more
void insertion_sort(int *a,int len)
{
int i,j,key;
for(i=1;i<len;i++){
key=a[i];
j=i-1;
while(j>=0 && a[j]>key){
a[j+1]=a[j];
j--;
}
a[j+1]=key;
}
......
Read more
Read more
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define LEN 8
int halfind(int *a,int key)
{
int start =0,end=LEN-1,mid;
while(start <= end){
mid=(start+end)/2;
if(a[mid] > key){
end=mid -1;
}
else if(a[mid] < key){
......
Read more
Read more
好久没更新博客了,太忙了^-^
这是我写的一个仿scanf函数,比较粗糙,只是练习一下变参
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
void dget(int *b, char k)
{
char n[20],*a;
a=n;
do{
*a=getchar();
a++;
}while(!(*(a-1) == '\n' || *(a-1) == k));
*(a-1)='\0';
......
Read more
Read more