Groups
Conversations
All groups and messages
Send feedback to Google
Help
Training
Sign in
Groups
自己动手写操作系统
Conversations
About
Groups keyboard shortcuts have been updated
Dismiss
See shortcuts
使用freedos执行lgdt指令遇到的问题
32 views
Skip to first unread message
Chi Zhang
unread,
Jan 5, 2013, 2:01:43 AM
1/5/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to osfrom...@googlegroups.com
求助贴:
首先,用git获得的freedos.img,执行第三章的
pmtest1.com
没有问题。
但是,当使用
http://www.fdos.org/bootdisks/autogen/FDSTD.144.imz
下载的freedos执行时,会遇到illegal instruction occurred和bochs:05847326306e[CPU0 ] LGDT: CPL != 0 causes #GP问题。
正常情况,我认为应该出现这种错误,lgdt指令是核心态指令,
pmtest1.com
是一个用户太程序。
我在bochs的
http://bochs.sourceforge.net/
没有找到书中说的freedos.img软盘镜像。
所以就找了一个带有format的freedos144软盘镜像,但是遇到了这个错误。
问题:
能帮忙解释一下为何从Mr.Yu的
freedos.img可以顺利执行pmtest1.com
吗?
bochs的官网中那里可以找到这样的freedos.img?
Mr.Yu的freedos.img如何可以使得用户程序执行lgdt这样的管态程序?
Marchorse Zhang
bg...@stu.ust.hk
unread,
Jan 5, 2013, 2:39:32 AM
1/5/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to osfrom...@googlegroups.com
在dos这种实模式环境下,没有特权级之分,所有程序都可以执行特权指令,不会有#GP,除非是dos中已经加载了某些内存驱动,比如HIMEM之类的,他们已然将cpu切到保护模式。你可以开dos时按f5,确保没有加载类似驱动。
你还可以单步跟踪你的程序,看一下什么时候出的#GP。
在 2013年1月5日星期六UTC+8下午3时01分43秒,Chi Zhang写道:
bg...@stu.ust.hk
unread,
Jan 5, 2013, 2:40:21 AM
1/5/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to osfrom...@googlegroups.com
在dos这种实模式环境下,没有特权级之分,所有程序都可以执行特权指令,不会有#GP,除非是dos中已经加载了某些内存驱动,比如HIMEM之类的,他们已然将cpu切到保护模式。你可以开dos时按f5,确保没有加载类似驱动。
你还可以单步跟踪你的程序,看一下什么时候出的#GP。
在 2013年1月5日星期六UTC+8下午3时01分43秒,Chi Zhang写道:
求助贴:
Chi Zhang
unread,
Jan 13, 2013, 9:07:12 PM
1/13/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to osfrom...@googlegroups.com
Thanks a lot!
最近登录googlegroups不畅。
在 2013年1月5日星期六UTC+8下午3时40分21秒,
bg...@stu.ust.hk
写道:
Reply all
Reply to author
Forward
0 new messages