delorie.com/archives/browse.cgi | search |
From: | "Damian Yerrick" <web DOT poison AT pineight DOT 8m DOT com> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: far pointers again |
Date: | Tue, 5 Oct 1999 10:45:37 -0500 |
Organization: | Rose-Hulman Institute of Technology |
Lines: | 40 |
Message-ID: | <7td6iu$spa$1@solomon.cs.rose-hulman.edu> |
References: | <7tcdq7$7ug AT cs DOT vu DOT nl> <7tcslg$ffj AT cs DOT vu DOT nl> |
NNTP-Posting-Host: | yerricde.laptop.rose-hulman.edu |
X-Trace: | solomon.cs.rose-hulman.edu 939138462 29482 137.112.205.146 (5 Oct 1999 15:47:42 GMT) |
X-Complaints-To: | news AT cs DOT rose-hulman DOT edu |
NNTP-Posting-Date: | 5 Oct 1999 15:47:42 GMT |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 5.00.2314.1300 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2314.1300 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
David Fokkema wrote: > > I think that code like: > > i = FARPEEKW(SEL, OFFSET); <= or something like that > printf("%d", i); > > which results in: > > mov ebx,SEL <= I believe this is what the > mov es,ebx <= far pointer functions do. > mov ebx,OFFSET <= At least some suggested macros > mov [ebp-x],word ptr es:[ebx] <= do. > > push word ptr [ebp-x] <= this is what i remember from > push dword ptr [y] <= what i checked already. but i > call _printf <= could be incorrect. > > is somewhat less efficient than: > > printf("%d", *this_is_a_far_pointer); > > which results in: > > push dword ptr [ebp-z] > push dword ptr [y] > call _printf > > At least it is programmersfriendlier to code. Why didn't someone take the > time to implement far pointers for ease of all those apparantly not totally > sane people like me who just want to use another segment without having to > use frustrating macros. I agree. I liked the way Borland did far pointers. It would make video access easier and speed porting of legacy real-mode code. Should some fellow suggest this to the GCC group?
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |