你能在保护模式下切换到C吗? [英] Can you switch to C in protected mode?

查看:59
本文介绍了你能在保护模式下切换到C吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一个宠物项目。我在DOS中开始组装,切换到

保护模式并在该环境中玩游戏。我是b / b
想知道我是否从C程序中的main开始然后调用程序集

的东西切换到pmode如果我可以使用一些C'的函数在

pmode?

谢谢

Eric

解决方案

Eric< no **** @ email.com>潦草地写道:

我有一个宠物项目,我正在努力。我在DOS中开始组装,切换到
保护模式并在该环境中玩游戏。我想知道我是否从主要的C程序开始然后调用程序集
东西切换到pmode,如果我可以在
pmode中使用一些C'的函数?




术语DOS,汇编,受保护模式等和pmode不是用C语言定义的
。它们是特定于某个操作系统的,而不是用于b
编程语言。

你的问题是完全的在这里偏离主题。请在新闻组中询问

专用于您自己的操作系统(MS-DOS?)。


-

/ - - Joona Palaste(pa*****@cc.helsinki.fi)-------------芬兰-------- \

\\ \\ - http://www.helsinki.fi/~palaste - -------------------规则! -------- /

"''可以很容易地证明'''的意思''我看过一次这样的证明(我没有这样做)
明白了)我不能再记得了''。"

- 数学老师


>我有一只宠物项目我正在努力。我在汇编中从DOS开始,切换到

保护模式并在该环境中玩游戏。我想知道我是否从主要的C程序开始然后调用程序集
东西切换到pmode,如果我可以在
pmode中使用一些C'的函数?







尝试回答你自己的问题:(二进制)代码写的

是否为非保护汇编语言中的模式通常在保护模式和非保护模式下都保持不变

?我对此表示怀疑。并且

如果它的工作没有变化,你为什么要关心你的模式是什么?
in?


Gordon L. Burditt


Joona I Palaste写道:

Eric< no **** @ email.com>潦草地写道:

我有一个宠物项目,我正在努力。我在DOS中开始组装,切换到保护模式并在那个环境中玩游戏。我想知道我是否从主要的C程序开始然后调用程序集
东西切换到pmode,如果我可以在
pmode中使用一些C'的函数?



术语DOS,汇编,受保护模式等。和pmode它们不是用C语言定义的。它们是特定于某个操作系统,而不是编程语言。
你的问题完全偏离主题。请在新闻组中询问
专用于您自己的操作系统(MS-DOS?)。




我不同意,我认为这是相关的。我问的是C的内部因为我没有特别提及printf或fopen并不意味着它不是关于C.

/>


I have a pet project I''m working on. I start in DOS in assembly, switch to
protected mode and play around with things in that environment. I''m
wondering if i started at main in a C program then called the assembly
stuff to switch to pmode if i could then use some of C''s functions in
pmode?
Thanks
Eric

解决方案

Eric <no****@email.com> scribbled the following:

I have a pet project I''m working on. I start in DOS in assembly, switch to
protected mode and play around with things in that environment. I''m
wondering if i started at main in a C program then called the assembly
stuff to switch to pmode if i could then use some of C''s functions in
pmode?



The terms "DOS", "assembly", "protected mode" and "pmode" are not
defined in C. They''re specific to a certain operating system, not to
programming languages.
Your question is completely off-topic here. Please ask in a newsgroup
dedicated to your own operating system (MS-DOS?).

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"''It can be easily shown that'' means ''I saw a proof of this once (which I didn''t
understand) which I can no longer remember''."
- A maths teacher


>I have a pet project I''m working on. I start in DOS in assembly, switch to

protected mode and play around with things in that environment. I''m
wondering if i started at main in a C program then called the assembly
stuff to switch to pmode if i could then use some of C''s functions in
pmode?



Most reasonable operating systems start in "protected mode", if the
CPU in question has one, and you never get to execute code outside
of it.

Try answering your own question: does the (binary) code written
for non-protected-mode in assembly language generally work unchanged
in both protected mode and non-protected mode? I doubt it. And
if it DOES work unchanged, why would you care which mode you are
in?

Gordon L. Burditt


Joona I Palaste wrote:

Eric <no****@email.com> scribbled the following:

I have a pet project I''m working on. I start in DOS in assembly, switch
to protected mode and play around with things in that environment. I''m
wondering if i started at main in a C program then called the assembly
stuff to switch to pmode if i could then use some of C''s functions in
pmode?



The terms "DOS", "assembly", "protected mode" and "pmode" are not
defined in C. They''re specific to a certain operating system, not to
programming languages.
Your question is completely off-topic here. Please ask in a newsgroup
dedicated to your own operating system (MS-DOS?).



I disagree, i think it is relevant. I''m asking about the internals of C
Just because i didn''t specifically mention printf or fopen doesn''t mean its
not about C.


这篇关于你能在保护模式下切换到C吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆