远记忆的历史......? [英] History of far memory...?

查看:70
本文介绍了远记忆的历史......?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我正在研究的这本书,来自1994年,提到了很多内存(即超过64K的内存) 。但是,我相信,

远的内存不再需要任何特殊的声明,例如_fmalloc,

farmalloc,far char pointers等,以区分它来自近乎记忆。我知道在Win32下这是真的。这在ANSI标准中是否正确,因为

好​​吗?另外,我是否应该假设任何涉及远存储器

的陈述应该用适当的非远程陈述代替?

另外,我从来没有(直到刚才现在)甚至听说过一个far char指针。

有人可以向我解释它是什么,它为什么被使用,以及如何更换

我应该遇到它?何时以及为什么远远没有使用?


谢谢,

Eric A. Johnson

Hi,

The book I am studying from, which comes from 1994, makes mention of far
memory (i.e., that memory beyond 64K). I am under the belief, however, that
far memory no longer needs any special statements, such as _fmalloc,
farmalloc, far char pointers, etc., to differentiate it from near memory. I
know that this is true under Win32. Is this true in the ANSI standard, as
well? Also, should I assume that any statements dealing with far memory
should be replaced with an appropriate non-far statement?
Also, I''ve never before (until just now) even heard of a far char pointer.
Can somebody explain to me what it is, why it was used, and how to replace
it should I come across it? When, and why, did far go out of use?

Thanks,
Eric A. Johnson

推荐答案

" Eric A. Johnson" <无***** @ dontlookforme.com>写道:
"Eric A. Johnson" <no*****@dontlookforme.com> writes:
我正在研究的这本书来自于1994年,它提到远存储器(即超过64K的存储器)。但是,我相信,远程记忆不再需要任何特殊的语句,例如_fmalloc,farmalloc,far char
指针等,以区别于近存储器。我知道在Win32下这是真的。


远的概念和近内存是非标准的

MS-DOSisms。它们在其他环境中无关。

这在ANSI标准中也是如此吗?另外,我是否应该假设任何处理远存储器的语句应该用适当的非远程语句替换?此外,我从来没有(直到现在)甚至没有听说过远处的char指针。
有人可以向我解释它是什么,为什么使用它,以及如何使用
如果我遇到它,请更换它?何时以及为什么远远没有使用?
The book I am studying from, which comes from 1994, makes
mention of far memory (i.e., that memory beyond 64K). I am
under the belief, however, that far memory no longer needs any
special statements, such as _fmalloc, farmalloc, far char
pointers, etc., to differentiate it from near memory. I know
that this is true under Win32.
The concepts of "far" and "near" memory are non-standard
MS-DOSisms. They are irrelevant in other environments.
Is this true in the ANSI standard, as well? Also, should I
assume that any statements dealing with far memory should be
replaced with an appropriate non-far statement? Also, I''ve
never before (until just now) even heard of a far char pointer.
Can somebody explain to me what it is, why it was used, and how
to replace it should I come across it? When, and why, did far
go out of use?




我会得到一本更好的书,一本关于C而不是C的书关于MS上的MS-DOS

变种你通常可以通过放弃'附近''

或'far''并使用标准替代函数来做好事,例如

malloc()而不是MS-DOS

编译器具有的near或far变体。但是对于那些不知道非标准的标准的新手来说,你可能最终会感到非常困惑。

-

int main(void){char p [] =" ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuv wxyz.\

\ n",* q =" kl BIcNBFr.NKEzjwCIxNJC" ;; int i = sizeof p / 2; char * strchr(); int putchar(\

); while(* q){i + = strchr(p,* q ++) - p; if(i> =(int)sizeof p)i- = sizeof p-1; putchar(p [i] \

);} return 0;}



I''d get a better book, one that''s about C instead of about MS-DOS
variants on C. You can usually do okay by just dropping `near''
or `far'' and using standard substitutes for functions, such as
malloc() instead of whatever `near'' or `far'' variant your MS-DOS
compiler has. But for novices who don''t know standard from
non-standards, you''re likely to end up pretty confused.
--
int main(void){char p[]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuv wxyz.\
\n",*q="kl BIcNBFr.NKEzjwCIxNJC";int i=sizeof p/2;char *strchr();int putchar(\
);while(*q){i+=strchr(p,*q++)-p;if(i>=(int)sizeof p)i-=sizeof p-1;putchar(p[i]\
);}return 0;}


Eric A约翰逊写道:
Eric A. Johnson wrote:


我正在研究的这本书,来自1994年,提到了很多内存(即超过64K的内存) )。但是,我相信,远程内存不再需要任何特殊的语句,例如_fmalloc,
farmalloc,far char指针等,以区别于近存储器。我知道在Win32下这是真的。这在ANSI标准中是否正确,因为
好吗?另外,我是否应该假设任何处理远存储器的语句都应该用适当的非远程语句替换?
此外,我从来没有(直到现在)甚至没有听说过远程字符指针。
有人可以向我解释它是什么,为什么使用它,以及如何更换
我应该遇到它吗?什么时候以及为什么远远没有用了?
Hi,

The book I am studying from, which comes from 1994, makes mention of far
memory (i.e., that memory beyond 64K). I am under the belief, however, that
far memory no longer needs any special statements, such as _fmalloc,
farmalloc, far char pointers, etc., to differentiate it from near memory. I
know that this is true under Win32. Is this true in the ANSI standard, as
well? Also, should I assume that any statements dealing with far memory
should be replaced with an appropriate non-far statement?
Also, I''ve never before (until just now) even heard of a far char pointer.
Can somebody explain to me what it is, why it was used, and how to replace
it should I come across it? When, and why, did far go out of use?




见Ben Pfaff的回复。


一个字明智的:这是你第二次从你的b
不祥的书中得到的东西不能完全达到15岁的b $ b b标准的挑战。将其视为过时并试图获得另一个。

请参阅comp.lang.c常见问题解答从
开始 http://www.eskimo.com/~scs/C-faq/top.html
$ b文学$ b,当然还有很多问题。

对于初学者:尝试拿到K& R2的副本。


Do没有使用Herbert Schildt的任何书籍 - 他是关于C的错误信息,错误想法和简单***的主要来源。

干杯

Michael

-

电子邮件:我的是/ at / gmx / dot / de地址。



See Ben Pfaff''s reply.

A word to the wise: This is the second time that something from your
ominous book is not quite up to the challenges of a fifteen year old
standard. Treat it as obsolete and try to get another one.
See the comp.lang.c FAQ starting at
http://www.eskimo.com/~scs/C-faq/top.html
for literature and of course many thoroughly answered problems.
For a beginner: Try to get your hands on a copy of K&R2.

Do not use any books by Herbert Schildt -- he is a major source of
misinformation, wrong ideas and plain *** about C.
Cheers
Michael
--
E-Mail: Mine is an /at/ gmx /dot/ de address.


Ben Pfaff写道:
Ben Pfaff wrote:

Eric A. Johnson <无***** @ dontlookforme.com>写道:

"Eric A. Johnson" <no*****@dontlookforme.com> writes:
我正在研究的这本书来自于1994年,它提到远存储器(即超过64K的存储器)。但是,我相信,远程记忆不再需要任何特殊的语句,例如_fmalloc,farmalloc,far char
指针等,以区别于近存储器。我知道在Win32下这是真的。
The book I am studying from, which comes from 1994, makes
mention of far memory (i.e., that memory beyond 64K). I am
under the belief, however, that far memory no longer needs any
special statements, such as _fmalloc, farmalloc, far char
pointers, etc., to differentiate it from near memory. I know
that this is true under Win32.



远的概念。和近内存是非标准的MS-DOSisms。它们与其他环境无关。



The concepts of "far" and "near" memory are non-standard
MS-DOSisms. They are irrelevant in other environments.



[...]


实际上,它更像是一个分段内存硬件-platform''ism比它

是MS-DOSism。很久以前,我将我们的68000-Xenix软件移植到了一个286-b
的Xenix平台上。 (286具有相同的16位分段架构

,MS-DOS使用的原始8088。)C编译器还有

有远和的概念靠近指针。


-

+ ------------------------ - + -------------------- + --------------------------- - +

| Kenneth J. Brody | www.hvcomputer.com | |

| kenbrody / at\spamcop.net | www.fptech.com | #include< std_disclaimer.h> |

+ ------------------------- + -------------- ------ + ----------------------------- +

不要给我发电子邮件:< mailto:Th ************* @ gmail.com>


[...]

Actually, it''s more of a segmented-memory-hardware-platform''ism than it
is an MS-DOSism. Long ago, I ported our 68000-Xenix software to a 286-
Xenix platform. (The 286 having the same 16-bit segmented architecture
that the original 8088 used by MS-DOS had.) The C compiler there also
had the concept of far and near pointers.

--
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody | www.hvcomputer.com | |
| kenbrody/at\spamcop.net | www.fptech.com | #include <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------------+
Don''t e-mail me at: <mailto:Th*************@gmail.com>


这篇关于远记忆的历史......?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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