91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

里面有一個(gè)簡單的操作系統(tǒng),還有操作系統(tǒng)生成的源代碼,代碼附有注釋。

資源截圖

代碼片段和文件信息



import?java.io.DataOutputStream;
import?java.io.File;
import?java.io.FileInputStream;
import?java.io.FileNotFoundException;
import?java.io.FileOutputStream;
import?java.io.IOException;
import?java.io.InputStream;
import?java.util.ArrayList;


public?class?HelloWorldOS?{
/*
?*?這段二進(jìn)制數(shù)據(jù)將是我們HelloWorld?OS?的內(nèi)核,它的作用是讓BIOS將其加載到地址0x8000然后調(diào)用BIOS中斷在屏幕上打印出一行字符串
?*/
????private?int[]?imgContent?=?new?int[]{
????????0xeb0x4e0x900x480x450x4c0x4c0x4f0x490x500x4c0x000x020x010x010x000x020xe0
????????0x000x400x0b0xf00x090x000x120x000x020x000x000x000x000x000x400x0b0x000x000x000x000x29
????????0xff0xff0xff0xff0x480x450x4c0x4c0x4f0x2d0x4f0x530x200x200x200x460x410x540x310x32
????????0x200x200x200x000x000x000x000x000x000x000x000x000x000x000x000x000x000x000x000x000x000xb80x000x000x8e
????????0xd00xbc0x000x7c0x8e0xd80x8e0xc00xbe0x740x7c0x8a
????????0x040x830xc60x010x3c0x000x740x090xb40x0e0xbb0x0f0x000xcd0x100xeb0xee0xf40xeb0xfd
????};

????private?ArrayList?imgByteToWrite?=?new?ArrayList();



????public?HelloWorldOS(String?s)?{
????????for?(int?i?=?0;?i?????????????imgByteToWrite.add(imgContent[i]);
????????}

????????imgByteToWrite.add(0x0a);
????????imgByteToWrite.add(0x0a);
????????for?(int?j?=?0;?j?????????????imgByteToWrite.add((int)s.charAt(j));
????????}
????????imgByteToWrite.add(0x0a);

????????int?len?=?0x1fe;
????????int?curSize?=?imgByteToWrite.size();
????????for?(int?k?=?0;?k?????????????imgByteToWrite.add(0);
????????}

????????/*
?????????*?要想讓機(jī)器將軟盤的頭512字節(jié)當(dāng)做操作系統(tǒng)的內(nèi)核加載到內(nèi)存,頭512字節(jié)的最后兩個(gè)字節(jié)必須是55aa
?????????*/
????????imgByteToWrite.add(0x55);
????????imgByteToWrite.add(0xaa);
????????imgByteToWrite.add(0xf0);
????????imgByteToWrite.add(0xff);
????????imgByteToWrite.add(0xff);

????????len?=?0x168000;?//
????????curSize?=?imgByteToWrite.size();
????????for?(int?l?=?0;?l?????????????imgByteToWrite.add(0);
????????}

????}

????public?void?makeFllopy()???{
????????try?{
???????? /*
???????? ?*?在磁盤上創(chuàng)建一個(gè)1474560字節(jié)的二進(jìn)制文件,將imgContent的內(nèi)容寫入該文件的頭512字節(jié),這個(gè)二進(jìn)制文件將作為一個(gè)1.5M的虛擬軟盤用于當(dāng)做
???????? ?*?虛擬機(jī)的啟動(dòng)軟盤
???????? ?*/
????????????DataOutputStream?out?=?new?DataOutputStream(new?FileOutputStream(“system.img“));
????????????for?(int?i?=?0;?i?????????????????out.writeByte(imgByteToWrite.get(i).byteValue());
????????????}
????????}?catch?(Exception?e)?{
????????????//?TODO?Auto-generated?catch?block
????????????e.printStackTrace();
????????}

????}

????public?static?void?main(String[]?args)?{
???? HelloWorldOS?op?=?new?HelloWorldOS(“hello?this?is?my?first?line?of?my?operating?system?code“);
????????op.makeFllopy();
????}
}

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件???????6148??2016-08-05?16:51??操作系統(tǒng)內(nèi)附源代碼\.DS_Store

?????文件?????116602??2016-08-05?16:27??操作系統(tǒng)內(nèi)附源代碼\Be?a?Hacker.docx

?????文件????????295??2016-08-05?16:07??操作系統(tǒng)內(nèi)附源代碼\HelloWorldOS\.classpath

?????文件????????371??2016-08-05?16:07??操作系統(tǒng)內(nèi)附源代碼\HelloWorldOS\.project

?????文件????????587??2016-08-05?16:07??操作系統(tǒng)內(nèi)附源代碼\HelloWorldOS\.settings\org.eclipse.jdt.core.prefs

?????文件???????2548??2018-01-03?23:20??操作系統(tǒng)內(nèi)附源代碼\HelloWorldOS\bin\HelloWorldOS.class

?????文件???????3092??2016-08-05?16:19??操作系統(tǒng)內(nèi)附源代碼\HelloWorldOS\src\HelloWorldOS.java

?????文件????1474560??2018-01-03?23:24??操作系統(tǒng)內(nèi)附源代碼\HelloWorldOS\system.img

?????目錄??????????0??2016-08-05?16:07??操作系統(tǒng)內(nèi)附源代碼\HelloWorldOS\.settings

?????目錄??????????0??2018-01-03?23:20??操作系統(tǒng)內(nèi)附源代碼\HelloWorldOS\bin

?????目錄??????????0??2016-08-05?16:08??操作系統(tǒng)內(nèi)附源代碼\HelloWorldOS\src

?????目錄??????????0??2018-01-04?14:10??操作系統(tǒng)內(nèi)附源代碼\HelloWorldOS

?????目錄??????????0??2016-08-05?16:27??操作系統(tǒng)內(nèi)附源代碼

-----------?---------??----------?-----??----

??????????????1604203????????????????????13


評(píng)論

共有 條評(píng)論