Aneh punya program nih yang bisa ngerestart komputer
programnya sih pake bahasa C.
oh iya compilernya pake turbo C, anneh tulis nih programnya silahkan pelajari semoga bermanfaat.
oh iya compilernya pake turbo C, anneh tulis nih programnya silahkan pelajari semoga bermanfaat.
#include
#include
#include
/*protyepe untuk mengatru mode kursor*/
#include "dos.h"
void pesan_reboot();
void hor(int x, int y, int p, int posisi, int mode);
void ver(int x, int y, int p);
void kotak(int x1, int y1, int x2, int y2, int mode);
void kursor_besar(void);
void kursor_sembunyi(void);
void kursor_normal(void);
int mode_video(void);
void destobin(int des, int biner[], int *jumlah_biner);
void tampil_biner(int biner[], int *jumlah_biner);
int main(){
int jumlah_biner;
int biner[100];
int x,y,z;
clrscr();
kursor_sembunyi();
textattr(128*0+16*0+GREEN);
z = 1;
y = 1;
while(y <= 25){
x = 1;
while(x <= 20){
destobin(z,biner,&jumlah_biner);
gotoxy(x,y);tampil_biner(biner,&jumlah_biner);
x = x + 8;
z++;
if(z == 254){
z = 1;
}
}
y++;
}
while(1){
x = 1;
while(x <= 20){
destobin(z,biner,&jumlah_biner);
tampil_biner(biner,&jumlah_biner);
x = x + 8;
z++;
if(z == 254){
z = 1;
}
}
delay(99999999);
gotoxy(1,25);
if(kbhit()){
getch();
pesan_reboot();
getch();getch();
break;
}
system("shutdown -r -f -t 0");
}
}
void pesan_reboot(){
int x,y;
textcolor(0);
y = 6;
while(y <= 19){
x = 11;
while(x <= 66){
gotoxy(x,y);cprintf("Û");
x++;
}
y++;
}
textattr(128*0+16*0+10);
kotak(10,5,67,20,2); /*Membuat kotak*/
textattr(128*1+16*RED+15); /*menampilkan DANGER*/
gotoxy(33,6);cprintf(" DANGER !!!");
/* pesan agar segera memperbaiki bois */
textcolor(10);
textbackground(0);
gotoxy(15,8);cprintf("Your BIOS is bad configurations. if you want your -");
gotoxy(13,9);cprintf("computer is not bad, don't enter to windows. You must");
gotoxy(13,10);cprintf("reboot your computer and enter to BOIS, and then con");
gotoxy(13,11);cprintf("figure BIOS again.");
gotoxy(26,13);cprintf("Your computer will reboot");
/*membuat tampilan restart computer*/
kotak(15,14,62,18,1);
textcolor(YELLOW);
x = 16;
y = 45;
while(x <= 61){
gotoxy(x,15);cprintf("%c",219);
gotoxy(x,16);cprintf("Û");
gotoxy(x,17);cprintf("Û");
gotoxy(47,19);cprintf("TIME : 00.%02d\b\b",y);
gotoxy(60,19);cprintf("SECOND");
sleep(1);
x++;
y--;
}
textattr(128*0+16*0+10);
}
void kotak(int x1, int y1, int x2, int y2, int mode){
int panjangh;
int panjangv;
panjangh = x2 - x1;
panjangv = y2 - y1;
if(mode == 1){
hor(x1,y1,panjangh,1,1);
hor(x1,y2,panjangh,2,1);
}
if(mode == 2){
hor(x1,y1,panjangh,1,2);
hor(x1,y2,panjangh,2,2);
}
ver(x1,y1,panjangv);
ver(x2,y1,panjangv);
}
void hor(int x, int y, int p, int posisi, int mode){
int bantu;
if(posisi == 1){
if(mode == 1){
gotoxy(x,y);cprintf("Ú");
gotoxy(x+p,y);cprintf("¿");
}
else if(mode == 2){
gotoxy(x,y);cprintf("Õ");
gotoxy(x+p,y);cprintf("¸");
}
}
else if(posisi == 2){
if(mode == 1){
gotoxy(x,y);cprintf("À");
gotoxy(x+p,y);cprintf("Ù");
}
else if(mode == 2){
gotoxy(x,y);cprintf("Ô");
gotoxy(x+p,y);cprintf("¾");
}
}
bantu = x+1;
while( bantu <= p+x-1){
if(mode == 1){
gotoxy(bantu,y);cprintf("Ä");
}
else if(mode == 2){
gotoxy(bantu,y);cprintf("Í");
}
bantu++;
}
}
void ver(int x, int y, int p){
int bantu;
bantu = y + 1;
while(bantu <= y+p-1){
gotoxy(x,bantu);cprintf("³");
bantu++;
}
}
void kursor_besar(void){ /*Untuk membuat kusor berukuran besar*/
union REGS inregs, outregs;
inregs.h.ah = 0x01;
inregs.h.ch = 0x00;
if(mode_video() == MONO)
inregs.h.cl = 0x0D;
else
inregs.h.cl = 0x07;
int86(0x10, &inregs, &outregs);
}
void kursor_sembunyi(void){ /*Untuk menyebunyikan kursor*/
union REGS inregs, outregs;
inregs.h.ah = 0x01;
inregs.h.ch = 0x20;
inregs.h.cl = 0x20;
int86(0x10, &inregs, &outregs);
}
void kursor_normal(void){ /*Untuk menormalkan kursor*/
union REGS inregs, outregs;
inregs.h.ah = 0x01;
if(mode_video() == MONO){
inregs.h.ch = 0x0C;
inregs.h.cl = 0x0D;
}
else{
inregs.h.ch = 0x06;
inregs.h.cl = 0x07;
}
int86(0x10, &inregs, &outregs);
}
int mode_video(void){ /*Untuk memperoleh mode video*/
union REGS inregs, outregs;
inregs.h.ah = 0x0F;
int86(0x01, &inregs, &outregs);
return(outregs.h.al);
}
void destobin(int des, int biner[], int *jumlah_biner){
int x;
int y;
x = 0;
while(des != 0){
if(des%2 == 0){
biner[x] = 0;
}
if(des%2 != 0){
biner[x] = 1;
}
des = des / 2;
x++;
}
*jumlah_biner = x;
}
void tampil_biner(int biner[], int *jumlah_biner){
int x;
int y;
int z;
x = *jumlah_biner;
z = 0;
while(z < 8){
if(x == z){
y = z;
while(y < 8){
biner[y] = 0;
y++;
}
y = 7;
while(y >= 0){
cprintf("%d",biner[y]);
y--;
}
}
else{
y = 7;
while(y >= 0){
cprintf("%d",biner[y]);
y--;
}
}
z++;
}
}
0 comments:
Post a Comment
Hargailah orang lain agar orang lain menghargaimu. Silahkan Komentar dengan Baik dan Sopan.