Intel Core 2 Duo, 64 bit assembling and Linux/Vista 32bit?

Started by Roc, April 17, 2007, 01:49:18 PM

Previous topic - Next topic

Roc

Hello everybody,

With some experience in C, C++, Java, Pascal I finally am trying to get also some results with assembler programming. Since I am lucky to own an Intel Core 2 Duo, there is always the "64bit" voice in the background. Here from the beginning I struggle with some perhaps elementary notions, which I was not able to fully understand (please apologize if the termonology is not perfect), here is how I see it:
Ok, 64bit assembly introduces some new registers and instructions. To translate them to appropriate machine code, a "64bit assembler" is needed (of course, since it must be able to understand the new notions). Now the point in assembly language is that I can have the full control of my machine. So, as it seems, why should I not be able to execute full 64bit code within a 32bit OS? Here, I speak of own short routines, not extern function calls of a 64bit OS, since then of course it would be clear again that this can not work.

So finally my questions: With an Intel Core 2 Duo and Vista Home Premium (32bit) how (if possible) can I make 64bit assembler code? What programs would I need?

Thank you.

MazeGen

Quote from: Roc on April 17, 2007, 01:49:18 PM
So, as it seems, why should I not be able to execute full 64bit code within a 32bit OS?
32-bit OS runs in 32-bit protected mode. New features are available only in 64-bit mode, so you need 64-bit OS. In other words, 64-bit mode is not backward-compatible with 32-bit protected mode. Note that for running 32-bit code, 64-bit OS uses dedicated mode called compatibility mode.

Quote from: Roc on April 17, 2007, 01:49:18 PM
So finally my questions: With an Intel Core 2 Duo and Vista Home Premium (32bit) how (if possible) can I make 64bit assembler code? What programs would I need?
You can make it, you can't run it. You need ML64.EXE, FASM.EXE or any other 64-bit-aware assembler, which is executable in 32-bit OS.

Roc

Thank you. So without spending a lot of money for a 64bit Vista version, a good option would be to work on a 64bit Linux?

I know this topic is discussed everywhere, but I would be interested in hearing a meaning from a dedicated assembler programmer: Which 64bit Linux version would you personally recommend, and with which assembler programs? (I have already used Ubuntu, openSuse, Fedora, Red Hat, Mandriva, Knoppix, even built LFS..., but I've used the 32bit versions so far).

MazeGen

There are also x64 editions of Win XP and Win Server 2003 (If I'm not wrong). Don't know about pricing, though.

As for Linux Version, I personally use Win XP x64 and ML64 or FASM, so I can't say anything about it. There is a forum dedicated to Linux on the fasm board so you can try to ask there (registration required).

http://board.flatassembler.net/forum.php?f=4

Human

why he cant run 64bit code on 32bit windows? i think he can use 64bit regs and memory addressing to 4gb with 64bit regs.
same thing was possible in 16bit mode for example:
mov eax,1
in 16bit it was 66 B8 01 00 00 00
in 32bit mode its  B8 01 00 00 00
but im not sure if ml64.exe allows it

BogdanOntanu

Quote
why he cant run 64bit code on 32bit windows? i think he can use 64bit regs and memory addressing to 4gb with 64bit regs.

Because they have designed the 64bit CPU in such a way as to be impossible to use 64bit register from 32bits protected mode. hence you need a 64bits OS in order to be able to use the 64bits mode of the CPU
Ambition is a lame excuse for the ones not brave enough to be lazy.
http://www.oby.ro

P1

Quote from: Human on May 22, 2007, 04:30:28 PMwhy he cant run 64bit code on 32bit windows? i think he can use 64bit regs and memory addressing to 4gb with 64bit regs.
Maybe in emulation mode, but yuck!  You might go ahead and get the 64bit uP.

AFAIK, There is no currently available 64bit emulators for 32bit uP's.

Regards,  P1   :8)

Vineel Kumar Reddy Kovvuri



hi Roc
there is a reply for ur question in the following post
http://www.masm32.com/board/index.php?topic=4854.new


here is a quick link to the website for 64bit assembler tools

http://www.jorgon.freeserve.co.uk



bobsobol

There is some legal ambiguity in the licensing for Windows Vista. When you purchase "Windows Vista Home Premium" (or any other flavor) you purchase "Windows Vista Home Premium", you don't own it, and there is no specification as to which platform (re x86 x64) you use it on.

The media (the CDs or DVD) you have purchased, you do own. But not the software it contains, that is only licensed for a single concurrent use. That license is enforced by the CD key, and your activation code.

Microsoft say you have to BUY a new license for Vista x64, only because they do not produce x86/x64 media, and the media you HAVE is x86. However, you do not NEED to BUY a new license, that you already have. The trouble is, they don't (now) sell media without a license. (at an early stage you could download the media free of charge, and buy a license [CD Key and activation] separately).

That same licensing still applies however, and if you can ACQUIRE media for the x64 version of Vista (from some other source... use your imagination I'm sure something will spring to mind) you can use your existing CD Key and activate a fresh x64 install of THE SAME FLAVOR OF VISTA only. Which means if your key is for Vista Home Basic, you must install Vista Home Basic, not Business, not Premium, not Ultimate or any other.

It's also worth noting that your license only entitles you to have one or the other platform installed on your PC. Which means if you attempt to set up a Dual Boot x86 and x64 install using the same CD key... your hardware change allowance will run out really really quick. Each change from x86 to x64 is considered (by Genuine Advantage) to be a considerable change in hardware (the CPU from a x86 processor to an x64 one) and requires re-activation.

Therefore, if you want to Dual Boot Vista x64, and x86 you DO need to BUY a second license of Vista. But if you simply want to SWITCH from x86 to x64 you need only get new media. The media has only the intrinsic value of it's production, and is not licensable. Anyone can produce media, to USE it you need the CD key to validate activation of it's use.

It is NOT illegal to DOWNLOAD and burn your own Vista Media, or to make a copy of someone else's. It is only illegal to use such media without the appropriate license. (CD Key and Activation code unique to a single hardware set)

I think you can see why Microsoft would prefer you to just buy a new copy... the alternative is a somewhat legal minefield, but if (and only if) you understand what I have said here... you can see that it is possible to upgrade from Vista x86 to Vista x64 legally, and for free. Microsoft do not deny this, but due to the complexity of doing it without breaking the law, they do not advertise the fact either.

I personally suspect that at some stage they had hoped to make this simple with the "Any time Upgrade" but it proved to complex to explain to users and was dropped. Thus making it even more complex for users, but less hassle for Microsoft.

Ghirai

MASM32 Project/RadASM mirror - http://ghirai.com/hutch/mmi.html

P1

Quote from: Ghirai on April 16, 2008, 11:47:34 PM
Quote from: P1 on May 22, 2007, 05:35:48 PMAFAIK, There is no currently available 64bit emulators for 32bit uP's.

Qemu can do that: http://fabrice.bellard.free.fr/qemu/index.html
As time marches on, This statement could not be true in perpetuity.

Regards,  P1   :8)

codewarp

Quote from: Roc on April 18, 2007, 11:23:42 AM
Thank you. So without spending a lot of money for a 64bit Vista version, a good option would be to work on a 64bit Linux?

I know this topic is discussed everywhere, but I would be interested in hearing a meaning from a dedicated assembler programmer: Which 64bit Linux version would you personally recommend, and with which assembler programs? (I have already used Ubuntu, openSuse, Fedora, Red Hat, Mandriva, Knoppix, even built LFS..., but I've used the 32bit versions so far).

A basic question should be asked:  If you are only just now trying your hand at assembler, what's wrong with 32-bit assembler?  What's the rush to 64-bit assembler?  If I were you, of course I'm not, I would stick to 32-bit until getting thoroughly up to speed with it--then worry about 64-bit.  Only applications that routinely require more than 2GB of memory ever "need" 64-bit, 32-bit CPUs can perform 64-bit arithmetic just fine, though not quite as fast.

Mark Jones

Most of the  http://www.xubuntu.org/  variants have 64-bit kernel versions, and need coders who can write drivers and other software.
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08