BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

64 Bit ideas

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Non-Technical)
View previous topic :: View next topic  
Author Message
Colin B Maharaj
Guest





PostPosted: Sun Feb 12, 2006 3:03 am    Post subject: 64 Bit ideas Reply with quote



Hi all, I have spoke about 64bit coding in the past, well with very my
little knowledge on the topic I want to propose the following....

1. Create some sort of ring0 driver code to get a 64Bit CPU to use
INLINE 64 bit code.

2. Let this driver run in 32 bit operating systems like Win2000 or WinXP
or maybe even win98/me.

That way we do not buy a new O/S and we have native 64 code running
in a native 64 bit CPU going around the native 32 bit O/S environment.

The thing is that it will operate like the old DOS extenders, remember
when there were tons of third party extenders where you can get 16 bit
windows or DOS to use the 32 bit processors?.

Why can this not happen now? I am sure there must be some creative
individual who call start this venture.

We need to get out 64bit code snippets to break through the 32bit O/S
barrier into the 64 bit CPU and do it's deed.

Any comments....
Back to top
Bob Gonder
Guest





PostPosted: Sun Feb 12, 2006 4:03 pm    Post subject: Re: 64 Bit ideas Reply with quote



Colin B Maharaj wrote:

Quote:
1. Create some sort of ring0 driver code to get a 64Bit CPU to use
INLINE 64 bit code.

Why?
Can't you add 64bit instructions to your 32bit program?
What would this driver do? Run64BitCode( &My64Code ) ?


Quote:
The thing is that it will operate like the old DOS extenders, remember
when there were tons of third party extenders where you can get 16 bit
windows or DOS to use the 32 bit processors?.

They were not needed, except to get access to more memory.
32 bit data code worked fine in DOS.

Quote:
Why can this not happen now?

Well, here's where we get off-topic (technical).
In the DOS days, interrupts ruled, and they saved all the 16bit
registers. You could get away with using 32 bit registers because none
of the interrupt routines modified the upper 16 bits of those
registers. Today with task switching, and register renaming....the
task switcher needs to save much more data, and that means larger
system blocks, which are created/maintained by the OS.

I guess your driver would need to replace the task switcher and Win
cpu-initialization code as well as the per-process setup/teardown.
Back to top
Colin B Maharaj
Guest





PostPosted: Sun Feb 12, 2006 9:03 pm    Post subject: Re: 64 Bit ideas Reply with quote



Hi Bob thanks for responding. Well you were saying that the I could
write inline 64bit code - just go ahead and do it.

Quote:
Why?
Can't you add 64bit instructions to your 32bit program?

But then again you said the OS is responsible for task switching, thus
can I assume that when task swiitching, win32 pushing all the items on
the stack and it will be 32 bit registers and not 64 bit registers.

Can I conclude that.....if I call 64 bit code and another app calls 64
bit code then we can corrupt each other's data when switching is going
on maybe 'cause the 32 bit OS switching routines are not saving all the
64bit registers.

(I hope I am reading you right ??!!??).
Bob Gonder wrote:
Back to top
Rudy Velthuis [TeamB]
Guest





PostPosted: Sun Feb 12, 2006 9:03 pm    Post subject: Re: 64 Bit ideas Reply with quote

At 15:56:47, 12.02.2006, Bob Gonder wrote:

Quote:
Colin B Maharaj wrote:

1. Create some sort of ring0 driver code to get a 64Bit CPU to use
INLINE 64 bit code.

Why?
Can't you add 64bit instructions to your 32bit program?

AFAIK, one can't. A program either runs in 32 bit mode or in 64 bit mode.
--
Rudy Velthuis [TeamB] http://rvelthuis.de/

"There is no sincerer love than the love of food."
- George Bernard Shaw (1856-1950)
Back to top
Rudy Velthuis [TeamB]
Guest





PostPosted: Mon Feb 13, 2006 8:03 pm    Post subject: Re: 64 Bit ideas Reply with quote

At 20:14:50, 13.02.2006, Bob Gonder wrote:

Quote:
Rudy Velthuis [TeamB] wrote:

Can't you add 64bit instructions to your 32bit program?

AFAIK, one can't. A program either runs in 32 bit mode or in 64 bit
mode.

Didn't they add a 32/64 bit prefix like they did for 16/32?

No.

Quote:
I remember writing 32 bit code with a 16bit assembler to run in DOS.

Yes, that was possible then.


--
Rudy Velthuis [TeamB] http://rvelthuis.de/

"Ask her to wait a moment - I am almost done."
-- Carl Friedrich Gauss (1777-1855), while working, when informed that
his wife is dying
Back to top
Bob Gonder
Guest





PostPosted: Mon Feb 13, 2006 8:03 pm    Post subject: Re: 64 Bit ideas Reply with quote

Rudy Velthuis [TeamB] wrote:

Quote:
Can't you add 64bit instructions to your 32bit program?

AFAIK, one can't. A program either runs in 32 bit mode or in 64 bit mode.

Didn't they add a 32/64 bit prefix like they did for 16/32?
I remember writing 32 bit code with a 16bit assembler to run in DOS.
Back to top
Bob Gonder
Guest





PostPosted: Mon Feb 13, 2006 8:03 pm    Post subject: Re: 64 Bit ideas Reply with quote

Colin B Maharaj wrote:

Quote:
(I hope I am reading you right ??!!??).

Maybe you are, but then again, maybe I wasn't writing right?
I beleive you can add 64bit registers to your inline asm code.
(Rudy doesn't seem to think that's the case.)
I beleive that should work (on 64bit CPU) most of the time, until
other people start doing it too.

It might not be a good idea yet for production code, but should be
fine to test/benchmark the "improvements", or to write 32bit compiled
code to run on a 64bit OS.

In the DOS says, there wasn't task switching, so no one could step on
the upper 16bits. Today that could be a problem. The Intel internals
are quite fuzzy to me right now, but my gut says that Windows32
doesn't manage 64bit switches.

Still don't know what you thought a ring 0 driver would bring?
Back to top
Wayne A. King
Guest





PostPosted: Tue Feb 14, 2006 3:03 am    Post subject: Re: 64 Bit ideas Reply with quote

On Mon, 13 Feb 2006 11:35:23 -0800, Bob Gonder <notbg (AT) notmindspring (DOT) invalid>
wrote:

Quote:
In the DOS says, there wasn't task switching, ...

DOS "days"? Which ones? Task *switching* was possible with DOS, from
around version 4/5 of MS-DOS and PC-DOS. IIRC, DR-DOS (Open DOS)
(vers 7?) included actual multi-tasking capability. Of course, using DesqView
under DOS even as far back as vers 3, one could multi-task DOS apps. I spent
many an hour downloading files in one (background) DV window while playing
Hearts or Cribbage in another, or editing text files, unzipping downloaded
files as they arrived, etc. - all on a robust 10mhz Turbo XT with 1 meg of true
EMS and MS-DOS 3.3 - circa 1989/90..


--
Wayne A. King
(waking (AT) idirect (DOT) com, Wayne_A_King (AT) compuserve (DOT) com)
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Non-Technical) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.