Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
boot

boot

Ratings: (0)|Views: 7|Likes:
Published by api-3767556

More info:

Published by: api-3767556 on Oct 16, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as TXT, PDF, TXT or read online from Scribd
See more
See less

03/18/2014

pdf

text

original

#include <stdio.h>
#include <conio.h>
#include <dos.h>
#include <mem.h>

unsigned char startbootmask[] =
{ 0xeb, 0x35 ,
/*0000
jmp 0037
*/
0x90,
/* 0002
nop
*/
};
unsigned char progbootmask[] =
{ 0xfa,
/* 0037
cli(clear interrupt)
interrupt'i saglayan bayrak temizlenir */
0xb8 , 0x30,0x00,
/* 0038
mov
ax,0030 stackayarlari
yapiliyor*/0x8e, 0xd0,
/* 003b
mov
ss,ax */
0xbc,0xfc, 0x00,
/* 003d
mov
sp,00fc */
0xfb,
/* 0040
sti(set interrupt) interrupt'larin
olanakli olmasini saglar */
0x0e,
/* 0041
push cs */
0x1f,
/* 0042
pop ds */
0xbe,0x66,0x7c,
/* 0043
mov si,7c66 */
0xb4,0x0e,
/* 0046
mov ah,0e */
0xfc,
/* 0048 cld(clear direction flag) */
0xac,
/* 0049
lodsb */
0x0a,0xc0,
/* 004a
or al,al */
0x74,0x04,
/* 004c
jz 0052sifir ise atla */
0xcd,0x10,
/* 004e int 10 */
0xeb,0xf7,
/* 0050 jmp 0049 */
0x9b,
/* 0052 wait */
};
char goru_nen[]="duygu dos system is starting....";

int islem(){
int i;
char bellek[512];

memset(bellek, 0, (int) 512 );//bellek ile belirtilen adresi 512 tane 0
karekteri basar.
if (absread(0, 1, 0, &bellek) != 0)//diski okuyarak hata kontrolu yapar.
perror("disket yok yada bozuk");

else {
memcpy( bellek,startbootmask,sizeof(startbootmask));
memcpy( &bellek[102-sizeof(progbootmask)], progbootmask,

sizeof(progbootmask));
memcpy( &bellek[102],goru_nen,sizeof(goru_nen));
printf("yaziliyor...");
delay(1000);

if (abswrite(0, 1, 0,&bellek) != 0)
perror ("\r diskette hata var");
elseprintf("\r yazildi.
\n");
gotoxy(12,12);printf("devam etmek icin bir tusa basiniz...");
getch();
}
return 0;
}

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->