??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美一区二区免费观在线,热99在线视频,手机福利小视频在线播放http://www.aygfsteel.com/wilsonny/category/1096.html爽的博?/description>zh-cnMon, 19 Mar 2007 08:47:31 GMTMon, 19 Mar 2007 08:47:31 GMT60Kernel启动q程的实?/title><link>http://www.aygfsteel.com/wilsonny/archive/2007/03/19/104717.html</link><dc:creator>爽</dc:creator><author>爽</author><pubDate>Mon, 19 Mar 2007 05:04:00 GMT</pubDate><guid>http://www.aygfsteel.com/wilsonny/archive/2007/03/19/104717.html</guid><wfw:comment>http://www.aygfsteel.com/wilsonny/comments/104717.html</wfw:comment><comments>http://www.aygfsteel.com/wilsonny/archive/2007/03/19/104717.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/wilsonny/comments/commentRss/104717.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/wilsonny/services/trackbacks/104717.html</trackback:ping><description><![CDATA[ <font color="#ff0000"> <strong>也就是说Q假?0 --> limit --> FFFF<br />那么如果一个段是expandupward的,他的offset只能?到limitQ而如果是expanddownward的,offset是从limit到FFFFQ且该栈的增长方向是limit-->FFFFQ即Q数据在内存中L从低地址攑ֈ高地址</strong> </font> <br /> <br />今天受益匪浅.....我塞Q如果不是在|络上搜索到的这句话Q我自己~写的Kernelq程怎么也调试不好?br />今天太高兴了Q终于把Kernel的进E机制调整好了!Q!截个图,庆祝一下?br />不过截图有个错误Q就是应该是Process的,而不是ThreadQ这两个东西有本质区别?br /><p align="center"><img src="http://www.aygfsteel.com/images/blogjava_net/wilsonny/19081/o_process.JPG" align="center" border="0" /></p><img src ="http://www.aygfsteel.com/wilsonny/aggbug/104717.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/wilsonny/" target="_blank">爽</a> 2007-03-19 13:04 <a href="http://www.aygfsteel.com/wilsonny/archive/2007/03/19/104717.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>我的Kernel实现了中?...http://www.aygfsteel.com/wilsonny/archive/2007/02/27/101033.htmlTue, 27 Feb 2007 15:26:00 GMThttp://www.aygfsteel.com/wilsonny/archive/2007/02/27/101033.htmlhttp://www.aygfsteel.com/wilsonny/comments/101033.htmlhttp://www.aygfsteel.com/wilsonny/archive/2007/02/27/101033.html#Feedback2http://www.aygfsteel.com/wilsonny/comments/commentRss/101033.htmlhttp://www.aygfsteel.com/wilsonny/services/trackbacks/101033.html 今天我把Kerneld了中断处理的部分。经qDEBUG以后l于可以q行了。值得注意的是QFAULTSq回是返回到当前行?br />



2007-02-27 23:26 发表评论
]]>
今天对Kernelq行了扩?/title><link>http://www.aygfsteel.com/wilsonny/archive/2007/02/26/100719.html</link><dc:creator>爽</dc:creator><author>爽</author><pubDate>Mon, 26 Feb 2007 04:54:00 GMT</pubDate><guid>http://www.aygfsteel.com/wilsonny/archive/2007/02/26/100719.html</guid><wfw:comment>http://www.aygfsteel.com/wilsonny/comments/100719.html</wfw:comment><comments>http://www.aygfsteel.com/wilsonny/archive/2007/02/26/100719.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/wilsonny/comments/commentRss/100719.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/wilsonny/services/trackbacks/100719.html</trackback:ping><description><![CDATA[ <p align="left"> <font size="2">今天对Kernelq行了扩充,Zq两天实C断机制。我~写了打印彩色字W的kprint函数和打印Int值的函数。期中有些BugQ不q都修改q了?br /><img src="http://www.aygfsteel.com/images/blogjava_net/wilsonny/19081/o_newop.JPG" align="center" border="0" /></font> </p> <img src ="http://www.aygfsteel.com/wilsonny/aggbug/100719.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/wilsonny/" target="_blank">爽</a> 2007-02-26 12:54 <a href="http://www.aygfsteel.com/wilsonny/archive/2007/02/26/100719.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>今天更新了我的操作系lKernelhttp://www.aygfsteel.com/wilsonny/archive/2007/02/22/100385.htmlThu, 22 Feb 2007 14:56:00 GMThttp://www.aygfsteel.com/wilsonny/archive/2007/02/22/100385.htmlhttp://www.aygfsteel.com/wilsonny/comments/100385.htmlhttp://www.aygfsteel.com/wilsonny/archive/2007/02/22/100385.html#Feedback0http://www.aygfsteel.com/wilsonny/comments/commentRss/100385.htmlhttp://www.aygfsteel.com/wilsonny/services/trackbacks/100385.html

今天更新了KernelQ编写了一个Kernel的Print函数Qvoid kprint(char *); 好久没有更新了,唉,q年了,事情太多了,没办法,串亲戚,会朋?......



2007-02-22 22:56 发表评论
]]>
我的KERNEL的树l构列表Q学习于渊的Q?/title><link>http://www.aygfsteel.com/wilsonny/archive/2007/02/03/97810.html</link><dc:creator>爽</dc:creator><author>爽</author><pubDate>Sat, 03 Feb 2007 15:26:00 GMT</pubDate><guid>http://www.aygfsteel.com/wilsonny/archive/2007/02/03/97810.html</guid><wfw:comment>http://www.aygfsteel.com/wilsonny/comments/97810.html</wfw:comment><comments>http://www.aygfsteel.com/wilsonny/archive/2007/02/03/97810.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.aygfsteel.com/wilsonny/comments/commentRss/97810.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/wilsonny/services/trackbacks/97810.html</trackback:ping><description><![CDATA[ <font size="2">虽然q还不能完全是自己的,但是ȝ有了q步啊,呵呵Q加油,要设计出自己的操作系l!Q?/font> <br /> <p align="center"> <img src="http://www.aygfsteel.com/images/blogjava_net/wilsonny/19081/o_kernelmanifest.JPG" align="center" border="0" /> </p> <img src ="http://www.aygfsteel.com/wilsonny/aggbug/97810.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/wilsonny/" target="_blank">爽</a> 2007-02-03 23:26 <a href="http://www.aygfsteel.com/wilsonny/archive/2007/02/03/97810.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>没有惛_堆栈的问题会q么严重Q!http://www.aygfsteel.com/wilsonny/archive/2007/02/03/97806.htmlSat, 03 Feb 2007 15:10:00 GMThttp://www.aygfsteel.com/wilsonny/archive/2007/02/03/97806.htmlhttp://www.aygfsteel.com/wilsonny/comments/97806.htmlhttp://www.aygfsteel.com/wilsonny/archive/2007/02/03/97806.html#Feedback0http://www.aygfsteel.com/wilsonny/comments/commentRss/97806.htmlhttp://www.aygfsteel.com/wilsonny/services/trackbacks/97806.html 今天发现自己的操作系l虽然可以在VMware和VPC下运行,但是在Bochs下会报错Q短短的几秒钟得Bochs产生了几十兆甚至上百兆的输出文g。在文g里面Q我发现报错主要是IRET的消息,说堆栈似乎有问题。经q检查代码,我发C问题所在。应该是mov esp,0x100的一句,写成了mov esp,0100,最后估计是因ؓ堆栈不够造成了Bochs报错。现在ȝ调节好了Q截个图。庆一下!




2007-02-03 23:10 发表评论
]]>
今天对Kernelq行了DEBUGQ用了C语言和汇~؜合编E?/title><link>http://www.aygfsteel.com/wilsonny/archive/2007/02/02/97682.html</link><dc:creator>爽</dc:creator><author>爽</author><pubDate>Fri, 02 Feb 2007 14:14:00 GMT</pubDate><guid>http://www.aygfsteel.com/wilsonny/archive/2007/02/02/97682.html</guid><wfw:comment>http://www.aygfsteel.com/wilsonny/comments/97682.html</wfw:comment><comments>http://www.aygfsteel.com/wilsonny/archive/2007/02/02/97682.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/wilsonny/comments/commentRss/97682.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/wilsonny/services/trackbacks/97682.html</trackback:ping><description><![CDATA[ <p align="center"> <img src="http://www.aygfsteel.com/images/blogjava_net/wilsonny/19081/o_NewKernel.JPG" align="center" border="0" /> <br /> <br /> <font size="2">虽然从整体上来看好像没有什么变化,但是今天修改了N多个BUGQȝ是完成汇~和C语言的؜合编E。问题最严重的BUG是ELF文g的ProgramHeader的读取。我没有惛_Q竟然ELF格式的ProgramHeader有的竟然D长度ؓ0Q!q可怎么理解啊,唉,找些书籍看看吧。弄不懂的话影响来开发Kernel?...</font> </p> <img src ="http://www.aygfsteel.com/wilsonny/aggbug/97682.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/wilsonny/" target="_blank">爽</a> 2007-02-02 22:14 <a href="http://www.aygfsteel.com/wilsonny/archive/2007/02/02/97682.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>关于C语言中static关键字的一些细?/title><link>http://www.aygfsteel.com/wilsonny/archive/2007/01/31/97058.html</link><dc:creator>爽</dc:creator><author>爽</author><pubDate>Wed, 31 Jan 2007 12:12:00 GMT</pubDate><guid>http://www.aygfsteel.com/wilsonny/archive/2007/01/31/97058.html</guid><wfw:comment>http://www.aygfsteel.com/wilsonny/comments/97058.html</wfw:comment><comments>http://www.aygfsteel.com/wilsonny/archive/2007/01/31/97058.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/wilsonny/comments/commentRss/97058.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/wilsonny/services/trackbacks/97058.html</trackback:ping><description><![CDATA[ <font size="2">定义了static 该变量就不可以ؓ其他文g所用了,q块内存区域标识为私?q样可以防止一些内存的错误操作,处于同样的道?头文仉面是不许出现static?lt;/CA></font> <img src ="http://www.aygfsteel.com/wilsonny/aggbug/97058.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/wilsonny/" target="_blank">爽</a> 2007-01-31 20:12 <a href="http://www.aygfsteel.com/wilsonny/archive/2007/01/31/97058.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>LOADERl于载入KERNEL了!Q?/title><link>http://www.aygfsteel.com/wilsonny/archive/2007/01/31/97051.html</link><dc:creator>爽</dc:creator><author>爽</author><pubDate>Wed, 31 Jan 2007 11:20:00 GMT</pubDate><guid>http://www.aygfsteel.com/wilsonny/archive/2007/01/31/97051.html</guid><wfw:comment>http://www.aygfsteel.com/wilsonny/comments/97051.html</wfw:comment><comments>http://www.aygfsteel.com/wilsonny/archive/2007/01/31/97051.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/wilsonny/comments/commentRss/97051.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/wilsonny/services/trackbacks/97051.html</trackback:ping><description><![CDATA[ <font size="2">今天~写了一下午E序Q最l完成了LOADER载入KERNELq把控制权交l了以ELF格式存在于磁盘上的KERNEL.BIN了。值得庆祝的一天,因ؓ以后l于可以使用C和汇~؜合编E了QWow~~~~~~~~截个图,呵呵?br /><p align="center"><img src="http://www.aygfsteel.com/images/blogjava_net/wilsonny/19081/o_InKernel.JPG" align="center" border="0" /></p></font> <img src ="http://www.aygfsteel.com/wilsonny/aggbug/97051.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/wilsonny/" target="_blank">爽</a> 2007-01-31 19:20 <a href="http://www.aygfsteel.com/wilsonny/archive/2007/01/31/97051.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>今天开始写操作pȝ初始化Kernel部分http://www.aygfsteel.com/wilsonny/archive/2007/01/31/96989.htmlWed, 31 Jan 2007 07:28:00 GMThttp://www.aygfsteel.com/wilsonny/archive/2007/01/31/96989.htmlhttp://www.aygfsteel.com/wilsonny/comments/96989.htmlhttp://www.aygfsteel.com/wilsonny/archive/2007/01/31/96989.html#Feedback0http://www.aygfsteel.com/wilsonny/comments/commentRss/96989.htmlhttp://www.aygfsteel.com/wilsonny/services/trackbacks/96989.html 今天开始写对ELF格式Kernel载入的程序,ELF文g格式本nq不难,只不q这D需要认真编写程序。下面截个图?br />



2007-01-31 15:28 发表评论
]]>
Cycar名称修改...http://www.aygfsteel.com/wilsonny/archive/2007/01/22/95327.htmlMon, 22 Jan 2007 06:02:00 GMThttp://www.aygfsteel.com/wilsonny/archive/2007/01/22/95327.htmlhttp://www.aygfsteel.com/wilsonny/comments/95327.htmlhttp://www.aygfsteel.com/wilsonny/archive/2007/01/22/95327.html#Feedback0http://www.aygfsteel.com/wilsonny/comments/commentRss/95327.htmlhttp://www.aygfsteel.com/wilsonny/services/trackbacks/95327.html 看来Cycar要修改名字了QCycar已经有h用了Q虽然不是操作系l。准备修改名UCؓCycardy......



2007-01-22 14:02 发表评论
]]>
今天Ҏ的“准操作pȝ”进行了修改http://www.aygfsteel.com/wilsonny/archive/2007/01/21/95145.htmlSun, 21 Jan 2007 08:20:00 GMThttp://www.aygfsteel.com/wilsonny/archive/2007/01/21/95145.htmlhttp://www.aygfsteel.com/wilsonny/comments/95145.htmlhttp://www.aygfsteel.com/wilsonny/archive/2007/01/21/95145.html#Feedback0http://www.aygfsteel.com/wilsonny/comments/commentRss/95145.htmlhttp://www.aygfsteel.com/wilsonny/services/trackbacks/95145.html 我准备把自己的系l命名ؓCycarQ名字的由来Q来自两个单词,Cyber和CardinalQ分别是数字和非帔R要(ULQ的意思。希望我的这个系l将来能够越来越powerfull。目前来_q个不能是自己的操作系l,因ؓ它缺很多东西,但是Q这些回慢慢扩充的。同Ӟ他目前可以算是按照《自己动手写操作pȝ》一步一步下来的Q没有原创的东西。如果非要给它一个版本号的话Q那么它的版本号?-10.0Q因为我q有十分的东襉K要学习和领悟Q然后慢慢实现自q操作pȝ。最l实?.0.1版本。呵呵呵。截个图?br />



2007-01-21 16:20 发表评论
]]>
今天的Loader实验ȝDEBUG完成http://www.aygfsteel.com/wilsonny/archive/2007/01/18/94691.htmlThu, 18 Jan 2007 08:22:00 GMThttp://www.aygfsteel.com/wilsonny/archive/2007/01/18/94691.htmlhttp://www.aygfsteel.com/wilsonny/comments/94691.htmlhttp://www.aygfsteel.com/wilsonny/archive/2007/01/18/94691.html#Feedback2http://www.aygfsteel.com/wilsonny/comments/commentRss/94691.htmlhttp://www.aygfsteel.com/wilsonny/services/trackbacks/94691.html 今天的程序编写倒不是很长时_但是DEBUG׃我好长时_具体前几ơ崩溃的原因没有扑և来,但是最l可以运行了?br />截个囄Q然后是汇编E序?br />



org 0x100
[bits 16]
jmp loaderStart

_GRAPH_SEG_OFFSET_ equ 0xb800

_RootEntCnt_ equ 0xe0

BS_OEMName db 'XXXXXXXX'
BPB_BytsPerSec dw 0x200
BPB_SecPerClus db 1
BPB_RsvdSecCnt dw 1
BPB_NumFATs db 2
BPB_RootEntCnt dw _RootEntCnt_
BPB_totSec16 dw 0xb40
BPB_Media db 0xf0
BPB_FATSz16 dw 9
BPB_SecPerTrk dw 0x12
BPB_NumHeads dw 2
BPB_HiddSec dd 0
BPB_totSec32 dd 0
BS_DrvNum db 0
BS_Reserved1 db 0
BS_BootSig db 0x29
BS_VolID dd 0
BS_VolLab db '11111111111'
BS_FileSysType db 'FAT12   '

parameters:
 screenPo dd 0
 STR_LEN equ 12
 bootStr db 'Loading...  '
 noLoaderStr db 'No Kernel...'
 ready db 'Ready       '
 KernelBase equ 0x8000
 KernelOffset equ 0x0
 rootEntryNum db _RootEntCnt_
 loaderName db 'KERNEL  BIN'


loaderStart:
 mov ax,cs
 mov ds,ax
 mov es,ax
 mov ss,ax
 mov sp,0100
 mov ax,_GRAPH_SEG_OFFSET_
 mov gs,ax
 
 mov dh,0
 call displayStr
 
 xor ah,ah
 mov dl,[BS_DrvNum]
 int 0x13
 
 mov ax,KernelBase
 mov es,ax
 mov bx,0
 mov ax,19
 mov cl,14
 call readSector
 
 
 xor edi,edi
 
anotherFile:
 xor esi,esi
 cmp byte [rootEntryNum],0
 je noLoader
 
nextChar:
 mov al,byte [es:edi]
 cmp byte [ds:loaderName+si],al
 jne notThisFile
 cmp si,10
 je found
 inc esi
 inc edi
 jmp nextChar
 
 notThisFile:
 shr edi,5
 inc edi
 shl edi,5
 dec byte [rootEntryNum]
 jmp anotherFile
 
noLoader:
 mov dh,1
 call displayStr
 jmp $
 
found:
 mov dh,2
 call displayStr
 
 mov ax,word [es:edi+(0x10)]
 mov cl,1
 
 push ax
 mov ax,KernelBase
 mov es,ax
 mov ebx,KernelOffset
 pop ax
 
 readEntry:
 
 cmp ax,0xfff
 je readEnd
 push ax
 add ax,19+14-2
 call readSector
 pop ax
 
 add ebx,512
 call getFATEntry
 
 jmp readEntry
 readEnd:
 
 jmp toProtectMode

displayStr:
 ; dh: String index
 push cx
 push ax
 push bx
 push esi
 push edi
 mov cx,STR_LEN
 mov edi,dword [screenPo]
 mov esi,bootStr
 xor eax,eax
 mov al,dh
 mov bl,STR_LEN
 mul bl
 add esi,eax
 .1:
 lodsb
 mov [gs:edi],al
 inc edi
 inc edi
 loop .1
 
 mov dword [screenPo],edi
 pop edi
 pop esi
 pop bx
 pop ax
 pop cx
 ret

readSector: ;ax: starting sector cl:number of sectors
 ; ah 0x2          al:number of sector to read
 ;      bx: es:bx
 ; ch:cylinder   cl:start sector
 ; dh:head num   dl:Drive
 push bp
 mov bp,sp
 push cx
 push dx
 push ax
 
 mov dl,[BPB_SecPerTrk]
 div dl
 mov cl,ah
 inc cl
 
 mov ch,al
 shr ch,1
 
 mov dh,al
 and dh,1
 
 mov dl,byte [BS_DrvNum]
 
 .1:
 mov ah,2
 mov al,byte [bp-2]
 int 0x13
 jc .1
  
 pop ax
 pop dx
 pop cx
 pop bp
 ret
 
getFATEntry:
 FATBaseInMem equ 0x7000
 ;ax is the entry number
 ;return ax is the next entry
 
 push es
 push bx
 push dx
 push cx
 
 mov bx,FATBaseInMem
 mov es,bx
 
 mov bx,3
 mul bx ;dx:ax
 mov bx,2
 div bx ;dx is the rest
 push dx
 
 xor dx,dx
 mov bx,[BPB_BytsPerSec]
 div bx
 mov cl,2
 xor bx,bx
 add ax,1
 call readSector
 mov bx,dx; mov byte index
 
 pop dx
 xor ax,ax
 cmp dx,0
 jne oddPart
 

 mov ax,word [es:bx]
 and ax,0x0fff
 
 jmp after
 oddPart:
 
 mov ax,word [es:bx]
 shr ax,4


 after:
 pop cx
 pop dx
 pop bx
 pop es
 
 ret
 
 
toProtectMode:
 jmp start
 
%macro Descriptor 3
 dw %2 & 0xffff
 dw %1 & 0xffff
 db (%1 >> 16) & 0xff
 dw ((%2 & 0x0f0000) >> 8) | (%3 & 0xf0ff)
 db (%1 >> 24) & 0xff
%endmacro

DummyGDT: Descriptor 0,0,0
CodeGDT: Descriptor 0,0xfffff,1100000010011010b
DataGDT: Descriptor 0,0xfffff,1000000010010010b
ScreenGDT: Descriptor 0xb8000,0xffff,0000000010010010b

GDTPtr dw $-DummyGDT-1
 dd 0x9000*0x10+DummyGDT

CodeSelector equ CodeGDT-DummyGDT
DataSelector equ DataGDT-DummyGDT
ScreenSelector equ ScreenGDT-DummyGDT

start:
 call killMotor
 cli
 mov dh,2
 call displayStr
 
 lgdt [GDTPtr]
 
 in al,0x92
 or al,10b
 out 0x92,al
 
 mov eax,cr0
 or eax,1
 mov cr0,eax
 
 jmp dword CodeSelector:(0x9000*0x10+ProtectMode)

killMotor:
 push dx
 mov dx,0x3f2
 mov al,0
 
 out dx,al
 pop dx
 ret


[bits 32]
ProtectMode:
 mov ax,ScreenSelector
 mov gs,ax
 xor edi,edi
 .again:
 inc byte [gs:edi]
 jmp .again



2007-01-18 16:22 发表评论
]]>
int 13h 不能数据读入显存的原因http://www.aygfsteel.com/wilsonny/archive/2007/01/17/94409.htmlWed, 17 Jan 2007 05:38:00 GMThttp://www.aygfsteel.com/wilsonny/archive/2007/01/17/94409.htmlhttp://www.aygfsteel.com/wilsonny/comments/94409.htmlhttp://www.aygfsteel.com/wilsonny/archive/2007/01/17/94409.html#Feedback0http://www.aygfsteel.com/wilsonny/comments/commentRss/94409.htmlhttp://www.aygfsteel.com/wilsonny/services/trackbacks/94409.html 在我认ؓQ读写磁盘的BIOS中断13H是用来向可用内存Q内存TYPE?Q中存入数据的。虽然目前对于X86l构的显存机制不是特别的了解Q但是显存的TYPE?Q这也就意味着不能够被操作pȝL使用。这PINT 13H也就不能够直接把盘数据转存到显存里面。如果需要把它的数据昄到屏q上面,可以通过下面的方式:

盘-->可用内存-->昑֭

应该是这样吧Q现在我仅仅是感性理解,需要将来看一些深入的书籍来了解?/font>



2007-01-17 13:38 发表评论
]]>
今天把BootE序DEBUG完成?/title><link>http://www.aygfsteel.com/wilsonny/archive/2007/01/16/94273.html</link><dc:creator>爽</dc:creator><author>爽</author><pubDate>Tue, 16 Jan 2007 10:40:00 GMT</pubDate><guid>http://www.aygfsteel.com/wilsonny/archive/2007/01/16/94273.html</guid><wfw:comment>http://www.aygfsteel.com/wilsonny/comments/94273.html</wfw:comment><comments>http://www.aygfsteel.com/wilsonny/archive/2007/01/16/94273.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/wilsonny/comments/commentRss/94273.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/wilsonny/services/trackbacks/94273.html</trackback:ping><description><![CDATA[ <p align="center"> <font size="2">今天l于把BootE序DEBUG完成了,下一步是~写Loaderq行载入Q我把我的Unit3最后一个完成的E序命名成Loader.comq拷贝到盘上面Q结果发现蝲入运行正常!Q鼓׃下,再接再厉Q!<br /></font> <img src="http://www.aygfsteel.com/images/blogjava_net/wilsonny/19081/o_bootFinal.JPG" align="center" border="0" /> </p> <img src ="http://www.aygfsteel.com/wilsonny/aggbug/94273.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/wilsonny/" target="_blank">爽</a> 2007-01-16 18:40 <a href="http://www.aygfsteel.com/wilsonny/archive/2007/01/16/94273.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>开始编写蝲入程?/title><link>http://www.aygfsteel.com/wilsonny/archive/2007/01/16/94182.html</link><dc:creator>爽</dc:creator><author>爽</author><pubDate>Tue, 16 Jan 2007 04:00:00 GMT</pubDate><guid>http://www.aygfsteel.com/wilsonny/archive/2007/01/16/94182.html</guid><wfw:comment>http://www.aygfsteel.com/wilsonny/comments/94182.html</wfw:comment><comments>http://www.aygfsteel.com/wilsonny/archive/2007/01/16/94182.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/wilsonny/comments/commentRss/94182.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/wilsonny/services/trackbacks/94182.html</trackback:ping><description><![CDATA[ <font size="2">今天开始编写蝲入程序Loader了,Loader应该负责载入内核和蟩入保护模式,然后把控制权交给内核。内怼计要q一D|间才能编写的Q先~写Loader吧?br /><br />搞不懂ؓ什么那本书要把内核~译成elf格式?....有空得看看gcc?/font> <img src ="http://www.aygfsteel.com/wilsonny/aggbug/94182.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/wilsonny/" target="_blank">爽</a> 2007-01-16 12:00 <a href="http://www.aygfsteel.com/wilsonny/archive/2007/01/16/94182.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>对于int 0x13不能载入到显存的认E序http://www.aygfsteel.com/wilsonny/archive/2007/01/12/93354.htmlFri, 12 Jan 2007 02:56:00 GMThttp://www.aygfsteel.com/wilsonny/archive/2007/01/12/93354.htmlhttp://www.aygfsteel.com/wilsonny/comments/93354.htmlhttp://www.aygfsteel.com/wilsonny/archive/2007/01/12/93354.html#Feedback0http://www.aygfsteel.com/wilsonny/comments/commentRss/93354.htmlhttp://www.aygfsteel.com/wilsonny/services/trackbacks/93354.htmlorg 0x7c00

mov ah,0
mov dl,0
int 0x13

mov ax,0x7f0
mov es,ax
mov ah,2
mov ch,0
mov dh,0
mov al,1
mov cl,2
mov dl,0
mov ebx,0
int 0x13

mov ax,0xb800
mov gs,ax
jmp 0x7f00

times 510-($-$$) db 0
dw 0xaa55

again:
.1:
inc byte [gs:8]
jmp .1

times 1024-($-$$) db 0

q个E序的执行成功说明有一D늚内存地址是不能够被int 0x13讉K的。但是具体是Z么需要进一步思考?/p>

2007-01-12 10:56 发表评论
]]>
~写载入E序ȝ盘出现的问题http://www.aygfsteel.com/wilsonny/archive/2007/01/12/93342.htmlFri, 12 Jan 2007 02:08:00 GMThttp://www.aygfsteel.com/wilsonny/archive/2007/01/12/93342.htmlhttp://www.aygfsteel.com/wilsonny/comments/93342.htmlhttp://www.aygfsteel.com/wilsonny/archive/2007/01/12/93342.html#Feedback0http://www.aygfsteel.com/wilsonny/comments/commentRss/93342.htmlhttp://www.aygfsteel.com/wilsonny/services/trackbacks/93342.html
mov ah,0
mov dl,0
int 0x13

mov ax,0x7d00; original: mov ax,0xb800
mov es,ax
mov ah,2
mov ch,0
mov dh,0
mov al,1
mov cl,1
mov dl,0
mov ebx,0
int 0x13

mov ah,0x4c
int 0x21

q么短短的程?在原先把盘W一扇区的数据蝲入到B800Q?000从屏q显C出来却执行完成后B800Q?000却没有数据,而如果修改了地址?d00却可以,q是Z么呢Q?/font>



2007-01-12 10:08 发表评论
]]>
使用GCC和NASM在Linux下联合编?/title><link>http://www.aygfsteel.com/wilsonny/archive/2007/01/10/93011.html</link><dc:creator>爽</dc:creator><author>爽</author><pubDate>Wed, 10 Jan 2007 14:06:00 GMT</pubDate><guid>http://www.aygfsteel.com/wilsonny/archive/2007/01/10/93011.html</guid><wfw:comment>http://www.aygfsteel.com/wilsonny/comments/93011.html</wfw:comment><comments>http://www.aygfsteel.com/wilsonny/archive/2007/01/10/93011.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/wilsonny/comments/commentRss/93011.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/wilsonny/services/trackbacks/93011.html</trackback:ping><description><![CDATA[ <p> <font size="2">今天使用nasm和gcc一L译了一个程?br />先用nasm~译一个asm文g为elf格式Q汇~文仉面有全局global的_start和functionCQ将来连接的时候用。其中还有extern用来表示外部C语言中的函数?br /><br />我的E序的调用结构: _start(ASM)->funB(C)->funC(ASM)<br />其中 ASM文g中:extern funB、global _start、global funC<br />C文g中声明:void funC();<br /><br />函数参数的传递:使用push来传?strong>地址</strong>Q而不是数倹{最后参数的清理需要caller来自p冟?/font> </p> <p> <font size="2">需要的命o行:</font> </p> <p> <font size="2">nasm -f elf -o <em>dest</em>.o <em>src</em>.asm </font> </p> <p> <font size="2">gcc -c -o <em>dest2</em>.o <em>src2</em>.c           (-c 的意思是仅仅compile)</font> </p> <p> <font size="2">ld -s -o <em>final</em>.o <em>dest</em>.o <em>dest1</em>.o</font> </p> <img src ="http://www.aygfsteel.com/wilsonny/aggbug/93011.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/wilsonny/" target="_blank">爽</a> 2007-01-10 22:06 <a href="http://www.aygfsteel.com/wilsonny/archive/2007/01/10/93011.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>关于BIOS中断讉K盘http://www.aygfsteel.com/wilsonny/archive/2007/01/10/92927.htmlWed, 10 Jan 2007 07:33:00 GMThttp://www.aygfsteel.com/wilsonny/archive/2007/01/10/92927.htmlhttp://www.aygfsteel.com/wilsonny/comments/92927.htmlhttp://www.aygfsteel.com/wilsonny/archive/2007/01/10/92927.html#Feedback0http://www.aygfsteel.com/wilsonny/comments/commentRss/92927.htmlhttp://www.aygfsteel.com/wilsonny/services/trackbacks/92927.html 因ؓ盘的前512字节负责启动机器Q?12字节如果惛_成关于保护模式,载入中断向量Q磁盘读写等功能几乎不可能。所以前512字节几乎都用来蝲入磁盘上特定的一个程序来q行下一步的工作。而蝲入的工作常常是利用中?x13来进行的。而由于中断的限制Q所以Linux不能引导1024扇区以后的内宏V不q当pȝ引导h以后Q因为重新蝲入了中断向量Q所以原来的int׃能够使用了。而在那时候,操作pȝ׃用端口来d盘了,׃需要再使用原来的BIOS中断了?/font>



2007-01-10 15:33 发表评论
]]>
惛_个自q操作pȝhttp://www.aygfsteel.com/wilsonny/archive/2007/01/09/92788.htmlTue, 09 Jan 2007 15:58:00 GMThttp://www.aygfsteel.com/wilsonny/archive/2007/01/09/92788.htmlhttp://www.aygfsteel.com/wilsonny/comments/92788.htmlhttp://www.aygfsteel.com/wilsonny/archive/2007/01/09/92788.html#Feedback1http://www.aygfsteel.com/wilsonny/comments/commentRss/92788.htmlhttp://www.aygfsteel.com/wilsonny/services/trackbacks/92788.html目前研究操作pȝQ整天用汇~语aQ很惛_个自q操作pȝ。不要求实用性,只求实现自己多年的梦惟?/font>

2007-01-09 23:58 发表评论
]]>
用来理解昄|늚汇编E序(NASM)http://www.aygfsteel.com/wilsonny/archive/2005/04/28/3896.htmlThu, 28 Apr 2005 14:24:00 GMThttp://www.aygfsteel.com/wilsonny/archive/2005/04/28/3896.htmlhttp://www.aygfsteel.com/wilsonny/comments/3896.htmlhttp://www.aygfsteel.com/wilsonny/archive/2005/04/28/3896.html#Feedback0http://www.aygfsteel.com/wilsonny/comments/commentRss/3896.htmlhttp://www.aygfsteel.com/wilsonny/services/trackbacks/3896.html;很多书都在说昄,是没有到底昄늚概念具体是什么的?BR>;80x86字符昄|8个。有对应的BIOS中断来切换页的,与之间没有直接关pȝ?BR>;当程序在多个中写程序时Q可以及时地在各个页中切换。向屏幕写字Wƈ且想要立ȝ刎ͼ一定要写到当前昄的页中?BR>;阅读下面的程序需要有引导E序的知?BR>
;下面的程序功能是?个页中写入不同的字符Q最后在各个中切换?BR>
;******************************************
;Copy Right Xiaoshuang Wang
;B.F.U
;2005
; 转蝲请保留此部分
;******************************************

org 0x7c00

bootStart:
 xor ax,ax
 mov ds,ax
 mov ss,ax
 mov sp,0x7c00
 mov bp,sp
 
 ; Init the DRIVE
 ; Boot drive number is stored in DX(lower part)
 mov [drive],dl

again:

 mov cx,200
 againChar:
 call putString
 loop againChar

 
 mov al,[page]
 inc al
 mov [page],al
 cmp al,0x8
 jne again
 
 mov cx,0x9
 xor al,al
 mov [page],al
 check:
 mov ah,0x05
 int 0x10
 xor ah,ah
 int 0x16
 mov al,[page]
 inc al
 mov [page],al
 loop check
 
db 0xea
dw 0x0000, 0xffff

data db '012345678'

putString:
 mov si,[page]
 mov al,[data+si]
 mov ah,0x0a
 mov bl,0x07
 mov bh,[page]
 int 0x10
retn


;************************
; Here are the data part
;************************
drive db 0
page db 0

times 510-($-$$) db 0
 dw 0xaa55
 



2005-04-28 22:24 发表评论
]]>
BIOS中断获得盘数据是怎么工作的?http://www.aygfsteel.com/wilsonny/archive/2005/04/21/3584.htmlThu, 21 Apr 2005 09:47:00 GMThttp://www.aygfsteel.com/wilsonny/archive/2005/04/21/3584.htmlhttp://www.aygfsteel.com/wilsonny/comments/3584.htmlhttp://www.aygfsteel.com/wilsonny/archive/2005/04/21/3584.html#Feedback1http://www.aygfsteel.com/wilsonny/comments/commentRss/3584.htmlhttp://www.aygfsteel.com/wilsonny/services/trackbacks/3584.htmlr_getInfo.GIF

我用nasm~写了一个Bin文gQ利用VMware把这个Bin文g作ؓ一个Y盘镜像,实际上,q个“Y盘”只?12字节。结果我利用BIOS中断得到的这个“Y盘”的数据却是......Q如上图Q。算下来Q大概有1.44M的空_可实际上只有512字节啊。BIOS中断获得盘数据I竟是怎么工作的呢Q暂时一个谜......


2005-04-21 17:47 发表评论
]]>
INT 0x10Q功能号0x0EQ显CZ个字W)http://www.aygfsteel.com/wilsonny/archive/2005/04/21/3583.htmlThu, 21 Apr 2005 09:27:00 GMThttp://www.aygfsteel.com/wilsonny/archive/2005/04/21/3583.htmlhttp://www.aygfsteel.com/wilsonny/comments/3583.htmlhttp://www.aygfsteel.com/wilsonny/archive/2005/04/21/3583.html#Feedback0http://www.aygfsteel.com/wilsonny/comments/commentRss/3583.htmlhttp://www.aygfsteel.com/wilsonny/services/trackbacks/3583.html关于昄一个字W到当前屏幕的INT 0x10Q功?x0EQ?BR>
              高八?nbsp;  低八?BR>              功能      ASCII?BR>      AX=  0x0E       
    
               号        前景?BR>      BX=  0x00Q?nbsp;        
   Q各个页有什么不同?Q?/FONT>

2005-04-21 17:27 发表评论
]]>
վ֩ģ壺 ຣʡ| ׼| | | | ɳ| | | | | | | ɽ| | | | | | | ͭϿ| | ľ| | ʯ| ƽɽ| | ɽ| ̫ԭ| ̶| | | | | ̨| | ¡| | ƽ½| | | |