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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? os-faq-memory.html

?? 教導(dǎo)你怎么樣寫(xiě)你自己的操作系統(tǒng),并且列出來(lái)其它操作系統(tǒng)作為舉例.
?? HTML
字號(hào):
<html><head>	<title>Operating Systems FAQ :: Memory</title>	<link rel=stylesheet type="text/css" href="default.css"></head><body><TABLE border="0" width="100%">	<TR>		<TD><H2><A name="what_is_a20">What is the A20 line?</A></H2>		</TD>	</TR>	<TR>		<TD>The A20 line takes a bit of explaining so hang with        me please.<P>When the AT was introduced, it was able to        access up to sixteen megabytes of memory, but in order to        remain compatible with the IBM-XT, due to a quirk in the        XT architecture (memory wraparound) had to be duplicated        in the AT so things would work the same, the 20th address        line on the bus (A20) was turned off so this        &quot;wrap-around&quot; effect worked and software from        the old XT days continued to work (compatibility was a        *B*I*G* issue back then).</P><P>The A20 line is controlled by the keyboard controller        unit. Which is usually a derivative of the 8042 chip.</P>		</TD>	</TR></TABLE><P>&nbsp;</P><TABLE border="0" width="100%">	<TR>		<TD><H2><A name="access_my_memory">Why can't I access all my memory! I have 128mb and can only use 1mb?</A></H2>		</TD>	</TR>	<TR>		<TD>The main reason you can't access all your memory (or        only &quot;odd&quot; megabytes) is because you need to        enable the A20 line on your bus. (For an explanation of        the A20 line, see <A href="#what_is_a20">What is the A20        line?</A>		</TD>	</TR></TABLE><P>&nbsp;</P><TABLE border="0" width="100%">	<TR>		<TD><H2><A name="enable_a20">How do I enable the A20 line?</A></H2>		</TD>	</TR>	<TR>		<TD>To enable the A20 line, you have to use some hardware        IO using the Keyboard Controller chip (8042 chip) and        enable it. Good documentation exists for the 8042 chip        but here is my source for enabling the A20 in C code.<P>The        flow chart for this is;</P>			<OL>				<LI>Disable interrupts				<LI>Wait until the keyboard buffer is empty				<LI>Send command to disable the keyboard				<LI>Wait until the keyboard buffer is empty				<LI>Send command to read output port				<LI>Wait until the keyboard buffer is empty				<LI>Save byte from input port				<LI>Wait until the keyboard buffer is empty				<LI>Send command Write output port				<LI>Wait until the keyboard buffer is empty				<LI>Send saved byte OR by 2 (GATE A20 to                 ON)				<LI>Wait until the keyboard buffer is empty				<LI>Enable the keyboard				<LI>Enable interrupts</LI>			</OL><P>Here is my C source;</P>		<PRE>/* Init the A20 by Dark Fiber */void init_A20(void){	UCHAR	a;	disable_ints();	kyb_wait_until_done();	kyb_send_command(0xAD);		// disable keyboard	kyb_wait_until_done();	kyb_send_command(0xD0);		// Read from input	kyb_wait_until_done();	a=kyb_get_data();	kyb_wait_until_done();	kyb_send_command(0xD1);		// Write to output	kyb_wait_until_done();	kyb_send_data(a|2);	kyb_wait_until_done();	kyb_send_command(0xAE);		// enable keyboard	enable_ints();}        </PRE>		<p>Or in ASM if you wish		<pre>;;;; NASM 32bit assembler;;[bits 32][section .text]enable_A20:	cli	call    a20wait	mov     al,0xAD	out     0x64,al	call    a20wait	mov     al,0xD0	out     0x64,al	call    a20wait2	in      al,0x60	push    eax	call    a20wait	mov     al,0xD1	out     0x64,al	call    a20wait	pop     eax	or      al,2	out     0x60,al        call    a20wait	mov     al,0xAE	out     0x64,al	call    a20wait	reta20wait:.l0:	mov     ecx,65536.l1:	in      al,0x64	test    al,2	jz      .l2	loop    .l1	jmp     .l0.l2:	reta20wait2:.l0:	mov     ecx,65536.l1:	in      al,0x64	test    al,1	jnz     .l2        loop    .l1	jmp     .l0.l2:	ret		</pre>		</TD>	</TR></TABLE><P>&nbsp;</P><TABLE border="0" width="100%">	<TR>		<TD><H2><A name="determine_memory">How do I determine RAM size?</A></H2>		</TD>	</TR>	<TR>		<TD>Determining how much memory you have is one of the        first things that most people implement in their kernel.        In the &quot;old&quot; days of operating systems this was        very easy as few people had more than 64mb of memory.<P>Why        did I mention 64mb of memory? Because that's all the CMOS        can hold up to 99mb values. When you encounter machines        with 128mb what are you going to do? There are some        functions in the BIOS for memory handling. The first set        of calls supported by all BIOS only returns what is in        the CMOS, thus making it irrelevant. There is some more        advanced calls but are not guaranteed to be in every BIOS        you encounter, and since not every machine supports it,        means its also not what we want. Two other methods people        use are directly probing memory, and using your        motherboard chipset registers to determine memory. The        only drawback with the later methos is you must know what        kind of chipset the user has on his motherboard....</P><P>I prefer to directly probe memory at every 1mb        interval and test for memory that way.</P><P>Something to note, not that you may need to know, is        that on old machines (maybe even new ones), it is        possible to have less than 640kb base memory and still        have extended memory beyond the 1mb mark. But in today's        machines where most people have single 64mb DIMM's, you        wont come across this.</P>		</TD>	</TR></TABLE><P>&nbsp;</P><TABLE border="0" width="100%">	<TR>		<TD><H2><A name="determine_memory_bios">How do I determine RAM size with BIOS?</A></H2>		</TD>	</TR>	<TR>		<TD>You can determine RAM size with the BIOS via two	        different calls.<P>The first call is built in nearly        every BIOS, the later call is only contained within newer        BIOS's</P>		<PRE>(from Ralf Brown's Interrupt Listing)--------B-1588-------------------------------INT 15 - SYSTEM - GET EXTENDED MEMORY SIZE (286+)  AH = 88h  Return: CF clear if successful    AX = number of contiguous KB starting at absolute address 100000h    CF set on error  AH = status    80h invalid command (PC,PCjr)    86h unsupported function (XT,PS30)        </PRE><P>Notes: TSRs which wish to allocate extended memory to        themselves often hook this call, and return a reduced        memory size. They are then free to use the memory between        the new and old sizes at will.</P><P>the standard BIOS only returns memory between 1MB and        16MB; use AH=C7h for memory beyond 16MB not all BIOSes        correctly return the carry flag, making this call        unreliable unless one first checks whether it is        supported through a mechanism other than calling the        function and testing        CF</P><P>SeeAlso:AH=87h,AH=8Ah&quot;Phoenix&quot;,AH=C7h,AX=DA88h,AX=E801h,AX=E820h</P>		<PRE>--------b-15E820-----------------------------INT 15 - newer BIOSes - GET SYSTEM MEMORY MAP  AX = E820h  EAX = 0000E820h  EDX = 534D4150h ('SMAP')  EBX = continuation value or 00000000h to start at beginning of map  ECX = size of buffer for result, in bytes (should be &gt;= 20 bytes)  ES:DI -&gt; buffer for result (see #00560)  Return: CF clear if successful    EAX = 534D4150h ('SMAP')    ES:DI buffer filled    EBX = next offset from which to copy or 00000000h if all done    ECX = actual length returned in bytes    CF set on error      AH = error code (86h) (see #00475 at INT 15/AH=80h)			</PRE><P>Notes: originally introduced with the Phoenix BIOS        v4.0, this function is now supported by most newer        BIOSes, since various versions of Windows call it to find        out about the system memory a maximum of 20 bytes will be        transferred at one time, even if ECX is higher; some        BIOSes (e.g. Award Modular BIOS v4.50PG) ignore the value        of ECX on entry, and always copy 20 bytes some BIOSes        expect the high word of EAX to be clear on entry, I.e.        EAX=0000E820h</P><P>if this function is not supported, an application        should fall back to AX=E802h, AX=E801h, and then AH=                         88h the BIOS is permitted to return a nonzero continuation value        in EBX and indicate that the end of the list has        already been reached by returning with CF set        on the next iteration this function will return        base memory and ISA/PCI memory contiguous with        base memory as normal memory ranges; it will indicate        chipset-defined address holes which are not in use and        motherboard memory-mapped devices, and all occurrences of the system             BIOSasreserved;standardPCaddressrangeswillnotbereported</P><P>SeeAlso:AH=C7h,AX=E801h&quot;Phoenix&quot;,AX=E881h,MEM             xxxxh:xxx0h&quot;ACPI&quot;</P>		<PRE>Format of Phoenix BIOS system memory map address range descriptor:Offset	Size	Description	(Table 00559) 00h	QWORD	base address 08h	QWORD	length in bytes 10h	DWORD	type of address range (see #00560)(Table 00560)Values for System Memory Map address type:  01h	memory, available to OS  02h	reserved, not available (e.g. system ROM, memory-mapped device)  03h	ACPI Reclaim Memory (useable by OS after reading ACPI tables)  04h	ACPI NVS Memory (OS is required to save this memory between NVS       	  sessions) other	not defined yet -- treat as Reserved SeeAlso: #00559        </PRE>		</TD>	</TR></TABLE><P>&nbsp;</P><TABLE border="0" width="100%">	<TR>		<TD><H2><A name="determine_memory_probe">How do I determine RAM size with direct probing?</A></H2>		</TD>	</TR>	<TR>		<TD>Directly probing memory, being a method that does not        rely on the BIOS makes it more portable than one that        does rely on the BIOS. Depending on how its coded, may or        may not take into account holes in system memory (15/16mb        mark ala OS/2) or memory mapped devices like frame        buffering SVGA cards, etc. 				<PRE>		/* * void count_memory (void) * * probes memory above 1mb * * last mod : 05sep98 - stuart george *            08dec98 - &quot;&quot;     &quot;&quot; *            21feb99 - removed dummy calls * */void count_memory(void){	register ULONG *mem;	ULONG	mem_count, a;	USHORT	memkb;	UCHAR	irq1, irq2;	ULONG	cr0;	/* save IRQ's */	irq1=inb(0x21);	irq2=inb(0xA1);	/* kill all irq's */	outb(0x21, 0xFF);	outb(0xA1, 0xFF);	mem_count=0;	memkb=0;	// store a copy of CR0	__asm__ __volatile(&quot;movl %%cr0, %%eax&quot;:&quot;=a&quot;(cr0))::&quot;eax&quot;);	// invalidate the cache	// write-back and invalidate the cache	__asm__ __volatile__ (&quot;wbinvd&quot;);	// plug cr0 with just PE/CD/NW	// cache disable(486+), no-writeback(486+), 32bit mode(386+)	__asm__ __volatile__(&quot;movl %%eax, %%cr0&quot;, :: &quot;a&quot; (cr0 | 0x00000001 | 0x40000000 | 0x20000000) : &quot;eax&quot;);	do	{		memkb++;		mem_count+=1024*1024;		mem=(ULONG*)mem_count;		a=*mem;		*mem=0x55AA55AA;				// the empty asm calls tell gcc not to rely on whats in its registers		// as saved variables (this gets us around GCC optimisations)		asm(&quot;&quot;:::&quot;memory&quot;);		if(*mem!=0x55AA55AA)			mem_count=0;		else		{			*mem=0xAA55AA55;			asm(&quot;&quot;:::&quot;memory&quot;);			if(*mem!=0xAA55AA55)				mem_count=0;		}		asm(&quot;&quot;:::&quot;memory&quot;);		*mem=a;	}while(memkb&lt;4096 &amp;&amp; mem_count!=0);	__asm__ __volatile__(&quot;movl %%eax, %%cr0&quot;, :: &quot;a&quot; (cr0) : &quot;eax&quot;);	mem_end=memkb&lt;&lt;20;	mem=(ULONG*)0x413;	bse_end=((*mem)&amp;0xFFFF)&lt;&lt;6;	outb(0x21, irq1);	outb(0xA1, irq2);}		</PRE>		</TD>	</TR></TABLE></body></html>

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品一区二区综合| 成人午夜视频免费看| 中文成人av在线| 欧美丰满美乳xxx高潮www| 懂色av中文字幕一区二区三区 | 在线电影院国产精品| 成人免费视频国产在线观看| 日本不卡不码高清免费观看| 亚洲欧美日韩国产手机在线 | 国产精品欧美一区二区三区| 欧美日本视频在线| 91欧美激情一区二区三区成人| 蜜臀av一区二区在线免费观看 | 欧美日韩精品系列| 99久久精品国产网站| 国产一区二区视频在线| 天堂资源在线中文精品| 亚洲男人的天堂在线aⅴ视频| 欧美精品一区二区三区视频| 欧美一级电影网站| 欧美日韩在线播放三区| 91国偷自产一区二区开放时间| 国产成人8x视频一区二区| 激情综合网激情| 青青草成人在线观看| 午夜欧美电影在线观看| 亚洲一区二区视频| 亚洲精品乱码久久久久久黑人 | 欧美bbbbb| 午夜a成v人精品| 一区av在线播放| 一区2区3区在线看| 一区二区视频免费在线观看| 亚洲人成影院在线观看| 成人欧美一区二区三区视频网页 | 亚洲情趣在线观看| 亚洲少妇30p| 亚洲视频1区2区| 亚洲码国产岛国毛片在线| 最新国产精品久久精品| 亚洲欧洲日韩一区二区三区| 国产精品久久毛片| 亚洲天堂精品视频| 亚洲欧美偷拍三级| 一级做a爱片久久| 亚洲人被黑人高潮完整版| 一区二区三区精品视频| 亚洲夂夂婷婷色拍ww47| 图片区小说区国产精品视频| 性久久久久久久久久久久| 日韩电影免费在线| 久久99久久久欧美国产| 国产麻豆日韩欧美久久| 国产不卡视频在线播放| av成人免费在线| 在线观看亚洲一区| 欧美精品成人一区二区三区四区| 欧美高清视频一二三区 | 国产成人小视频| 99久久er热在这里只有精品66| 一本一本久久a久久精品综合麻豆| 色哟哟精品一区| 这里是久久伊人| 亚洲精品一区二区三区精华液 | 精品乱人伦小说| 国产日产欧美一区| 一区二区欧美国产| 美女一区二区视频| 福利电影一区二区三区| 91黄色小视频| 亚洲精品在线网站| 最新国产精品久久精品| 日韩av不卡在线观看| 国产黑丝在线一区二区三区| 日本乱人伦aⅴ精品| 欧美一级艳片视频免费观看| 久久久.com| 亚洲国产成人av网| 国产一区二区精品久久| 91久久精品日日躁夜夜躁欧美| 日韩欧美色综合网站| 中文字幕人成不卡一区| 免费看欧美女人艹b| av在线不卡电影| 日韩视频在线永久播放| 亚洲婷婷在线视频| 狠狠色丁香久久婷婷综合丁香| 99热精品国产| 日韩女优av电影在线观看| 亚洲精品五月天| 精品一区二区日韩| 在线日韩av片| 国产欧美日本一区二区三区| 亚洲午夜精品网| 成人sese在线| 欧美成人精品高清在线播放| 亚洲激情成人在线| 国产不卡在线播放| 欧美不卡在线视频| 亚洲国产日韩av| 菠萝蜜视频在线观看一区| 日韩欧美123| 亚洲成av人片在www色猫咪| 丁香婷婷综合网| 精品国产乱码久久久久久影片| 亚洲香肠在线观看| av不卡在线观看| 久久久精品免费网站| 热久久一区二区| 欧美日韩视频第一区| 亚洲日本成人在线观看| 国产成人免费在线观看不卡| 精品国产一区二区三区忘忧草| 视频在线观看一区二区三区| 色婷婷国产精品| ...xxx性欧美| 懂色av一区二区在线播放| 久久久久久久av麻豆果冻| 美国毛片一区二区| 4438x成人网最大色成网站| 一区二区高清在线| 欧日韩精品视频| 一区二区三区在线免费观看 | 制服丝袜亚洲网站| 亚洲午夜日本在线观看| 欧洲精品在线观看| 亚洲午夜视频在线| 欧美视频在线播放| 一区二区久久久久| 欧美在线观看视频一区二区 | 一区二区三区免费网站| 99精品1区2区| 亚洲品质自拍视频| 日本国产一区二区| 一区二区欧美在线观看| 欧美体内she精视频| 亚洲国产一区二区三区青草影视 | 在线视频你懂得一区| 亚洲香蕉伊在人在线观| 欧美日韩一级黄| 亚洲电影一区二区三区| 欧美日韩在线综合| 无码av中文一区二区三区桃花岛| 欧美福利视频一区| 另类欧美日韩国产在线| 精品国产乱码久久久久久久久| 国产米奇在线777精品观看| 国产亚洲欧洲一区高清在线观看| 国产精品一区二区你懂的| 欧美国产日本韩| 色婷婷精品久久二区二区蜜臂av| 一区二区三国产精华液| 欧美一区二区美女| 国产成人在线视频网站| 国产精品久久久久一区二区三区| 97久久人人超碰| 亚洲成av人片在www色猫咪| 日韩欧美另类在线| 成人av综合一区| 亚洲国产美女搞黄色| 91精品国产乱| 国产99一区视频免费 | 国产一区不卡在线| 国产精品人人做人人爽人人添| 一本色道亚洲精品aⅴ| 日韩国产成人精品| 久久久不卡网国产精品一区| www.欧美精品一二区| 亚洲国产aⅴ天堂久久| 精品久久久久久最新网址| 国产99一区视频免费| 亚洲国产一二三| 久久精品亚洲麻豆av一区二区| 91小视频免费观看| 欧美bbbbb| 亚洲日本在线视频观看| 日韩免费电影一区| 99国产精品一区| 免费观看久久久4p| 国产精品麻豆欧美日韩ww| 精品视频全国免费看| 国产一区二区三区在线观看免费| 亚洲免费三区一区二区| 日韩欧美国产电影| 色欧美日韩亚洲| 韩国一区二区视频| 亚洲一区电影777| 午夜精品爽啪视频| 国产三级一区二区| 91 com成人网| 91在线视频网址| 韩日欧美一区二区三区| 亚洲国产aⅴ成人精品无吗| 中文字幕av在线一区二区三区| 欧美天堂亚洲电影院在线播放| 大尺度一区二区| 麻豆精品在线视频| 亚洲一区二区欧美| 亚洲欧洲日韩女同| 久久久久久黄色|