1 #include <u.h> 2 #include <libc.h> 3 4 static char x[1024]; 5 static char s[64] = " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; 6 7 static void fill(void)8fill(void) 9 { 10 int i; 11 12 for(i = 0; i < sizeof(x); i += sizeof(s)){ 13 memmove(&x[i], s, sizeof(s)); 14 x[i] = i>>8; 15 x[i+1] = i; 16 } 17 } 18 19 void main(int argc,char * argv[])20main(int argc, char *argv[]) 21 { 22 int i = 2560; 23 24 if(argc > 1){ 25 argc--; argv++; 26 i = atoi(*argv); 27 } 28 USED(argc); 29 30 fill(); 31 32 while(i--) 33 write(1, x, sizeof(x)); 34 exits(0); 35 } 36