亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? the boot sector.html

?? 1000 HOWTOs for various needs [WINDOWS]
?? HTML
?? 第 1 頁 / 共 2 頁
字號:
<html>

<head>

<title>The Boot Sector</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

<body bgcolor="#000000" text="#ffffff" link="#ffffff" vlink="#ffffff">

<div align="center">

<table width="680" border="0" cellspacing="2" cellpadding="2" align="center">

  <tr>

    <td width="693">

      <pre>

                        :::::::::   ::::::::  :::::::::  ::::::::::

                        :+:    :+: :+:    :+: :+:    :+: :+:

                        +:+    +:+ +:+        +:+    +:+ +:+

                        +#++:++#+  +#++:++#++ +#++:++#:  :#::+::#

                        +#+    +#+        +#+ +#+    +#+ +#+

                        #+#    #+# #+#    #+# #+#    #+# #+#

                        #########   ########  ###    ### ###



              	             <a href="http://blacksun.box.sk" target="_blank">http://blacksun.box.sk</a>

              	             <a href="http://awc.rejects.net" target="_blank">http://awc.rejects.net</a>

                           _____________________________

    ______________________I       <b>   Topic:</b>             I_____________________

   \                      I                             I                    /

    \     HTML by:        I      <b>The Boot Sector</b>        I   Written by:     /

    >                     I                             I                  <

   /      <a href="mailto:black_mesa@hacktik.org">Martin L.</a>       I_____________________________I   <a href="mailto:fu@ckz.org">Ralph</a>           \

  /___________________________>                    <_________________________\</pre>

    </td>

  </tr>

</table>

</div>

<p>Version: 1.0 Date: 7/31/00</p>

<h3>TOC</h3>

<ol>

  <li><a href="#1">Introduction</a><ul>

  <li><a href="#1a">What you need</a></li></ul></li>

  <li><a href="2">Basic hard drive/BIOS shit</a></li>

  <li><a href="3">Making a Boot Sector</a></li>

  <li><a href="4">Making a program to write a boot sector</a></li>

  <li><a href="5">Other</a></li>

</ol>

<a name="1"><h3><u>1. Introduction</u></h3>

<blockquote>

<p>Well usually I give you a specific purpose at this point, but in this case I can't.

I was just in the mood to write something on boot sectors so I did it.  And maybe

(hopefully) someone out there can make use of this info.  This thing will most likely

became part of a larger tutorial, maybe something on assembly or on OS design.

After having consumed this text file you should know enough to design and create your

own boot sector, maybe for a virus, or an OS, or...?</a>

</blockquote>

<a name="1a"><h3><u>What you need</u></h3>

<blockquote>

<p>Before reading this you should have a basic knowledge of assembly.  If you don't, read

my other tutorial, it's called Sk00l m3 ASM!!#@$!@# and is available from awc.rejects.net

We will be using 2 different programs to code this shit: NASM and TASM.  NASM is freely

available from <a href="http://www.web-sites.co.uk/nasm/" target="_blank">http://www.web-sites.co.uk/nasm/</a>, but TASM you have to buy.  I don't like

piracy, but if you're just gonna use TASM this once, don't bother spending $150 on it.

There are plenty of sites that have a copy.</p>

<p>Why am I using 2 different programs?  Well I have always used NASM to make simple

programs as it's good at creating efficient memory copies.  I always use TASM to make

programs a bit more complex.  In the end however it comes down to the answer "why not??".

However, it shouldn't be hard at all to make the TASM program in NASM (or the other way

around), just change a few things here and there.  If enough people come bitch to me, I'll

rewrite all the code for NASM/TASM.</p></blockquote>

<a name="2"><h3><u>2. Basic hard drive/BIOS shit</u></h3>

<blockquote>

<p>As soon as you flip that switch, your CPU starts executing shit located at F000:FFF0.

This area contains the BIOS, Basic Input/Output System.  This code is written in assembly

and is stored in chips called EPROMs in your computer.  This code will perform something

known as POST, Power On Self Test.  This checks for installed devices and checks if they

all work.  In particular it checks for the video card and runs the video BIOS usually

located at C000h.  Next it checks for other ROMs to see if they have installed BIOSes.

Usually it then finds and executes the hard drive BIOS located at C8000h.  Then it starts

something like a "system inventory" where it checks for other installed devices and

tests them.  It does some more stuff that's all basicly useless for us right now,

until it finally transfers control over to the operating system.  That's the part that

we're interested in.  Back in the old days, only one OS was installed on a computer.

If you bought a certain computer, you could only run the OS that was made for it.

Nothing else.  Obviosly that wasn't such a good thing as you would have to buy a new

computer if you wanted a different OS, so BIOS makers came up with the Boot Sector.

In case you didn't know yet, a Sector is the smallest area your hard drive can access.

According to the ATA standards each sector is exactly 512 bytes.  However ATA standards

only apply to hard drives, things like floopies can use whatever they want.

Knowing this we can move on to the boot sector.</p>

</blockquote>

<h3><u>3. Making a Boot Sector</u></h3>

<blockquote>

<p>After the BIOS has successfully completed the POST it calls interrupt 19h.  You can

actually see this by dumping the memory located at F000:FFF0.  For example, on my box

I used debug with the following result:<br>

<i>-d f000:fff0</i><br>

F000:FFF0  CD 19 E0 00 F0 31 31 2F-32 36 2F 39 39 00 FC 81   .....11/26/99...</p>

<p>As you should know, CD = INT.  INT 19h attempts to read in the Boot Sector of the 1st

floppy disk.  If it fails it does the same thing on the 1st hard drive.  If that fails

it returns an error message.  A valid boot sector must have its last two bytes set to

AA55h.  Assuming a valid boot sector is found, the code is loaded into memory at location

0000:7C00 and interrupt 19h jumps there to start executing the code.  Since a boot sector

has to fit into one sector (512 bytes) it can't really do much, usually it does a search

for another file on another sector, then executes it.  Our boot sector won't do that.

For now it is enough that it displays a message and reboots when you press a key.  Since

DOS is not loaded yet, we have to use BIOS interupts to do all this.  First we display a

messages using interupt 10h.  Next we wait for the user to press a key using interrupt

16h, and finally we make a FAR jump to FFFF:0000 which we restart the computer.  So lets

code this bitch:</p>

<p>First we use the code</p>

<table>

<tr>

  <td>&nbsp;</td>

  <td>MOV AX,0x0003</td>

</tr>

<tr>

  <td>&nbsp;</td>

  <td>INT 0x10</td>

</tr>

<tr>

  <td colspan="2">to get into video mode.  The registers have to be set up like this:</td>

</tr>

<tr>

  <td>AH</td><td>Function number (00h, video)</td>

</tr>

<tr>

  <td>AL</td><td>Video Mode (03, 80x25x16)</td>

</tr>

<tr>

  <td colspan="2">Next we print the message using:</td>

</tr>

<tr>

  <td>&nbsp;</td><td>MOV AX,0x1301</td>

</tr>

<tr>

  <td>&nbsp;</td><td>MOV BX,0x0007</td>

</tr>

<tr>

  <td>&nbsp;</td><td>MOV CX,0x23</td>

</tr>

<tr>

  <td>&nbsp;</td><td>MOV BP,MSG</td>

</tr>

<tr>

  <td>&nbsp;</td><td>ADD BP,0x7C00</td>

</tr>

<tr>

  <td>&nbsp;</td><td>INT 0x10</td>

</tr>

<tr>

  <td>AH</td><td>Function number (13h: print string)</td>

</tr>

<tr>

  <td>AL</td><td>Write Mode (01h: string is characters only, attribute in BL, cursor moved)</td>

</tr>

<tr>

  <td>BH</td><td>Video Page number (00h)</td>

</tr>

<tr>

  <td>BL</td><td>Attributes of characters (07h)</td>

</tr>

<tr>

  <td>CX</td><td>Length of string, excluding any attributes (23h = 35 characters)</td>

</tr>

<tr>

  <td>BP</td>

  <td>ES:BP must point to the string, since a boot sector starts at 07C00, we add that

     to BP after we loaded it.  You could also set the entry point of the program to

     07C00, or change the data segment register to point to 07C00, but since it's just

     one instruction, this is fine for now.</td>

</tr>

<tr>

  <td colspan="2">Now we wait for the key to be pressed:</td>

</tr>

<tr>

  <td>&nbsp;</td><td>MOV AH,0x00</td>

</tr>

<tr>

  <td>&nbsp;</td><td>INT 0x16</td>

</tr>

</table>

<p><b>Registers:</b><br>

AH - 00, Read keyboard buffer, wait till full if not already.<br>

The buffer will be empty since the computer didn't get time to put anything into it yet.

Finally we reboot the computer by simply jumping to 0000:FFFF:</p>

<blockquote>

<p>DB 0xEA<br>

     DW 0x0000<br>

     DW 0xFFFF</p>

</blockquote>

<p>This looks a bit wierd but it's actualy quite simple.  When declaring "variables" in

assembly, the assembler simply puts the value into a memory location.  Usually you

use interrupts or something to point to them in order to use and manipulate them, but we

could also put code there.  This is what we're doing here.  If you get a Hex to Mnemonix

chart you will notice that EA is a Far Jump.  So we put that into memory, followed by

the location to jump to.</p>

<p>Next we fill the the remaining memory with NULL:<br>

<blockquote>

     TIMES 510-($-$$) DB 0</p>

</blockquote>

<p>This could also be done in TASM with something like TIMES 510 DUP (0).

Finally we have to add those two bytes to the end so that the BIOS will know that this is

a valid boot sector. This is done with the simple statement:<br>

<blockquote>

SIGNATURE DW 0xAA55</p>

</blockquote>

<p>Here is the full code to everything we just discussed:</p>

<table>

<tr>

  <td colspan="2"><b>START:</b></td>

</tr>

<tr>

  <td width="25">&nbsp;</td>

  <td>MOV AX,0x0003</td>

</tr>

<tr>

  <td>&nbsp;</td><td>INT 0x10</td>

</tr>

<tr>

  <td colspan="2"><b>PRINT_STRING:</b></td>

</tr>

<tr>

  <td>&nbsp;</td><td>MOV AX,0x1301</td>

</tr>

<tr>

  <td>&nbsp;</td><td>MOV BX,0x0007</td>

</tr>

<tr>

  <td>&nbsp;</td><td>MOV CX,0x23</td>

</tr>

<tr>

  <td>&nbsp;</td><td>MOV BP,MSG</td>

</tr>

<tr>

  <td>&nbsp;</td><td>ADD BP,0x7C00</td>

</tr>

<tr>

  <td>&nbsp;</td><td>INT 0x10</td>

</tr>

<tr>

  <td colspan="2"><b>WAIT_FOR_KEY_PRESS:</b></td>

</tr>

<tr>

  <td>&nbsp;</td><td>MOV AH,0x00</td>

</tr>

<tr>

  <td>&nbsp;</td><td>INT 0x16</td>

</tr>

<tr>

  <td colspan="2"><b>REBOOT:</b></td>

</tr>

<tr>

  <td>&nbsp;</td><td>DB 0xEA</td>

</tr>

<tr>

  <td>&nbsp;</td><td>DW 0x0000</td>

</tr>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人自拍视频在线观看| 亚洲欧美国产三级| 午夜精彩视频在线观看不卡| 精东粉嫩av免费一区二区三区| 91黄色小视频| 国产精品成人午夜| 国产成人午夜高潮毛片| 欧美一卡2卡3卡4卡| 亚洲成av人片一区二区三区| 99re这里只有精品视频首页| 国产精品视频一二三| 另类小说欧美激情| 欧美一区午夜视频在线观看| 一区二区成人在线| 欧美专区日韩专区| 亚洲精品视频免费观看| 色婷婷一区二区三区四区| 一区免费观看视频| 在线观看日韩精品| 日韩精品欧美成人高清一区二区| 欧美日韩不卡一区| 精品影视av免费| 国产三级欧美三级日产三级99 | 精品国产一区二区在线观看| 亚洲综合男人的天堂| 欧美日韩在线观看一区二区 | 国产女人aaa级久久久级 | 91精品国产欧美一区二区18| 蜜臀av性久久久久av蜜臀妖精 | 蜜臀av在线播放一区二区三区| 欧美一区二区三区小说| 成人免费视频免费观看| 亚洲精品国产无套在线观| 欧美日韩国产色站一区二区三区| 麻豆精品国产传媒mv男同| 国产精品欧美久久久久一区二区| 日本道精品一区二区三区| 日本欧美一区二区三区| 国产精品网站导航| 日韩一级欧美一级| 韩国精品免费视频| 亚洲主播在线播放| 久久久精品黄色| 欧美日韩国产免费一区二区| 成人污视频在线观看| 婷婷中文字幕综合| 成人免费视频在线观看| 欧美成人精品1314www| 91久久国产综合久久| 国产老妇另类xxxxx| 日韩电影在线观看一区| 一区二区三区中文字幕在线观看| 精品免费99久久| 欧美群妇大交群的观看方式| 99久久婷婷国产综合精品| 国产一区二区三区不卡在线观看| 亚洲激情图片qvod| 日韩精品一区二区三区蜜臀 | 欧美色中文字幕| 99久久精品国产一区二区三区| 国内精品在线播放| 琪琪久久久久日韩精品| 亚洲一区二区精品视频| 亚洲午夜视频在线观看| 亚洲欧洲av一区二区三区久久| 欧美经典三级视频一区二区三区| 日韩欧美亚洲另类制服综合在线| 欧美色综合网站| 91丨porny丨在线| 99在线视频精品| 99久久久久久| 国产精品亚洲第一 | 久久综合久久综合久久综合| 精品久久免费看| 久久亚洲影视婷婷| 久久久久久久久免费| 中文字幕+乱码+中文字幕一区| 国产亚洲综合av| 国产精品卡一卡二卡三| 亚洲视频在线一区观看| 亚洲电影在线免费观看| 日本aⅴ免费视频一区二区三区| 热久久久久久久| 国产一区二区三区在线观看精品| 国产成人h网站| 91丨九色porny丨蝌蚪| 51精品久久久久久久蜜臀| 欧美成人三级在线| 18成人在线视频| 天堂一区二区在线| 国产成人h网站| 欧美日韩在线电影| 久久伊99综合婷婷久久伊| 国产精品美女久久久久久久久| 一区二区三区久久久| 韩国毛片一区二区三区| 日本久久一区二区三区| 精品免费99久久| 亚洲国产日韩一区二区| 丁香网亚洲国际| 91精品国产综合久久福利| 日本一区二区成人在线| 午夜久久久久久电影| av激情综合网| 日韩精品中午字幕| 国产午夜精品一区二区三区嫩草| 国产日韩欧美不卡在线| 视频在线观看一区| 91免费看视频| 国产欧美精品一区aⅴ影院| 日韩激情中文字幕| 91福利小视频| 亚洲欧美在线视频观看| 成人免费黄色大片| 精品成人一区二区三区| 亚洲香肠在线观看| 一本一道久久a久久精品| 国产精品毛片a∨一区二区三区| 麻豆91在线播放| 欧美精品第1页| 一区二区三区在线观看视频| 成人在线一区二区三区| 久久精品在线观看| 麻豆精品在线看| 欧美刺激脚交jootjob| 青青草伊人久久| 欧美一卡在线观看| 久久精品噜噜噜成人88aⅴ| 在线播放91灌醉迷j高跟美女| 亚洲国产美国国产综合一区二区| 色噜噜狠狠色综合中国| 亚洲综合精品自拍| 欧美日韩国产综合一区二区 | 久久久精品2019中文字幕之3| 国产在线播精品第三| 国产午夜精品理论片a级大结局| 久久99久久99小草精品免视看| 精品国产乱码久久久久久老虎| 韩日欧美一区二区三区| 国产亚洲欧美在线| 成人午夜电影网站| 一区二区三区免费观看| 91精品国产综合久久香蕉的特点| 男人的j进女人的j一区| 精品电影一区二区| 色综合天天综合网天天狠天天 | 国产亚洲综合在线| 成人激情小说网站| 一区二区高清视频在线观看| 国产精品传媒视频| 91色乱码一区二区三区| 洋洋av久久久久久久一区| 欧美喷水一区二区| 一级精品视频在线观看宜春院| 色婷婷激情综合| 免费不卡在线视频| 国产亚洲欧美一区在线观看| 国产精品一区专区| 久久综合久色欧美综合狠狠| 国产999精品久久久久久| 亚洲午夜免费视频| 精品国产91九色蝌蚪| 北条麻妃一区二区三区| 亚洲国产美女搞黄色| 日韩一区二区三| 色综合中文字幕国产| 亚洲综合清纯丝袜自拍| 久久你懂得1024| 欧美日韩中文精品| 国产盗摄女厕一区二区三区| 一区二区在线观看视频| 欧美精品一区二区三区在线播放| 色综合久久久久网| 国产精品综合av一区二区国产馆| 亚洲精品国产品国语在线app| 欧美日韩在线播放三区| 国产91在线看| 美女视频黄 久久| 亚洲动漫第一页| 中文字幕在线不卡一区二区三区| 日韩视频免费观看高清完整版 | 久久久久97国产精华液好用吗| 欧美日韩高清影院| 成人高清免费观看| 国产一区二区在线看| 蜜臂av日日欢夜夜爽一区| 中文成人综合网| 国产亚洲人成网站| 欧美一区二视频| 91麻豆.com| 在线欧美日韩精品| 一本大道久久a久久精品综合| 成人动漫在线一区| 狠狠狠色丁香婷婷综合久久五月| 一区二区三区高清| 亚洲精品老司机| 亚洲欧洲日产国码二区| 国产精品三级av在线播放| 中文字幕av一区二区三区高| 欧美不卡一二三|