home *** CD-ROM | disk | FTP | other *** search
- #include<stdio.h>
- #include<stdlib.h>
- #include<dos.h>
- #define pr(x) fprintf(fp,x)
-
- /* change password */
- main()
- {
- FILE *fp;
- system("cls");
- cursor(12,20);
- color_puts("╒²╘┌╔·│╔╨▐╕─┐┌┴ε ,╟δ╔╘║≥!",14);
- fp=fopen("setp.prg","w");
- pr("clear\n");
- pr("set safety off\nset color to W+/B\n");
- pr("@2,2 say '┐┌ ┴ε ╨▐ ╕─'\n");
- pr("do while .T.\nset color to W+/B\n");
- pr("@10,20 say ' '\n");
- pr("accept ' ╟δ ╩Σ ╚δ ╨┬ ┐┌ ┴ε : ' to password\n");
- pr("pw=' '\n");
- pr("do while pw<>'Y'.and.pw<>'N'\n");
- pr("@20,20 say '─π ─▄ ╚╖ ╚╧ ┬≡? (Y/N)' get pw picture '!' \n");
- pr("read\n");
- pr("enddo\nset color to W+/B\n");
- pr("@20,0 say space(80)\n");
- pr("if pw='Y'\n");
- pr("exit\n");
- pr("endif\n");
- pr("enddo\n");
- pr("save to word all like passwor?\n");
- pr("set safety on\n");
- pr("return\n");
- fclose(fp);
- }
-
-
-
-
-
- cursor(y,x)
- int x,y;
- { union REGS inregs;
- union REGS outregs;
- inregs.h.ah=2;
- inregs.h.bh=0;
- inregs.h.dh=y;
- inregs.h.dl=x;
- int86(0x10,&inregs,&outregs);
- }
-
-
-
- color_puts(s,color)
- char *s;
- int color;
- { union REGS r;
- int x,y,z;
- now_cursor(&x,&z);
- y=z;
- while (*s)
- { if (*s=='\n')
- { s++;
- x++;
- y=z;
- continue;
- }
- cursor(x,y);
- r.h.ah=9;
- r.h.al=*s++;
- r.h.bl=color;
- r.h.bh=0;
- r.x.cx=1;
- int86(0x10,&r,&r);
- y++;
- cursor(x,y);
- }
- return;
- }
-
-
- now_cursor(x,y)
- int *x,*y;
- { union REGS r;
- r.h.ah=3;
- r.h.bh=0;
- int86(0x10,&r,&r);
- *x = r.h.dh;
- *y = r.h.dl;
- return;
- }