News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Assembly Language under 64 bit OS

Started by Gunther, September 05, 2010, 09:07:30 PM

Previous topic - Next topic

Gunther

I've finished now the update of my 64 bit Linux system; Ubuntu (Maverick Meerkat) is now running. I've inspected the assembly language source of a few simple C programs. That's really not very exciting. It seems that the compiler designers have to learn a lot.

What's the point? There is enough space on my hard disk. It should be possible to run Windows 7 (64 bit) in parallel. Is it worth the effort? Are there any 64 bit programming projects? Which compiler and assembler should be used?

Regards,
Gunther
Forgive your enemies, but never forget their names.

frktons

The most promising projects you can find on this forum are GOASM and JWASM and maybe
some more I'm not aware of. Just have a look at the subsections for 64 bit programming.

Frank
Mind is like a parachute. You know what to do in order to use it :-)

Gunther

Hi Frank,

thank you for the fast reply.

Quote from: frktonsĀ  September 05, 2010, 11:19:07 pmThe most promising projects you can find on this forum are GOASM and JWASM

Good to know. NASM is also available and the 64 bit version of masm, too. So, I'll try Win7 next week, but very careful. I hope it won't overwrite my MBR during installation.

I could also have a legal copy of VS 2010 from my university. Do you have some experiences with it?

Gunther
Forgive your enemies, but never forget their names.

dedndave

it should leave the MBR intact, as long as it is valid and bootable
you can always make a backup copy of it with MBR Wizard or something
but, if it wipes out the MBR entirely, it will probably trash all your nice files - lol
it shouldn't alter any partitions other than the one you are building on

frktons

Quote from: Gunther on September 06, 2010, 12:01:51 AM
Hi Frank,

thank you for the fast reply.

Quote from: frktonsĀ  September 05, 2010, 11:19:07 pmThe most promising projects you can find on this forum are GOASM and JWASM

Good to know. NASM is also available and the 64 bit version of masm, too. So, I'll try Win7 next week, but very careful. I hope it won't overwrite my MBR during installation.

I could also have a legal copy of VS 2010 from my university. Do you have some experiences with it?

Gunther


JWASM is written in C and is portable, and it has been ported to Linux as well,
no need to install WIN/7 if you are not planning to work on it.

No expertise whatsoever with VS2010, only the possibility to use it, especially
the command line tools, the only one I think I'll be using for a while.  :P
Frank
Mind is like a parachute. You know what to do in order to use it :-)

Gunther

Quote from: dedndave September 06, 2010, at 11:40:08 AMit should leave the MBR intact, as long as it is valid and bootable

The MBR is valid and bootable, but their resides the first stage of GRUB. I've probably an alternative: Let Win7 reside at an external hard drive, which is bootable via USB. I hope that works.

Quote from: frktons September 06, 2010, at 11:45:57 AMNo expertise whatsoever with VS2010, only the possibility to use it, especially the command line tools, the only one I think I'll be using for a while.

The point is: a gcc for Win7 is available, but the 64bit gcc seems not very well designed at the moment. So, VS would be an alternative. I'll check that out.

Gunther
Forgive your enemies, but never forget their names.

ecube

GoASM is absolutely fantastic when it comes to 64bit because it doesn't need any libs to link to, takes the necessary info right out of the dll, and ofcourse you can build 64bit binaries on a 32bit system. Also writing hybrid code(code the works on 32bit and 64bit with no changes short of compiling different) is real easy too. plus invoke works to same, func frames are auto converted to fastcall, registers eax, etc... are auto converted to rax, etc... I have goasm built dlls, services, regular exe's all working great on x64 and i'm close to testing a mini driver. Goasm doesn't have builtin x64 SEH though, which personally I don't care the VEH api is far better anyway, and works on 32bit aswell.

frktons

Quote from: Gunther on September 06, 2010, 06:42:17 PM

The MBR is valid and bootable, but their resides the first stage of GRUB. I've probably an alternative: Let Win7 reside at an external hard drive, which is bootable via USB. I hope that works.

Gunther


I would pay a lot of attention when it comes to mix win systems and linux.
A way that I prefer is to have separate hard disk, external is better if you can
get it working.

GRUB and win MBR sometime play nasty games together, in my experience.

Frank
Mind is like a parachute. You know what to do in order to use it :-)

Gunther

Quote from: E^cube September 06, 2010, at 08:13:32 PMGoASM is absolutely fantastic when it comes to 64bit

Yes, I've heard that. It comes also with a mighty resource compiler.

Quote from: frktonsĀ  September 06, 2010, 09:24:37 PMI would pay a lot of attention when it comes to mix win systems and linux.

Frank, you're absolutely right. After buying the machine, I "erased" first 32 bit Vista and installed 32 bit XP, together with partitioning the hard disk. After that, I installed Linux with GRUB; I hadn't any problems until now, because Windows was "helpless". But the situation has changed a bit, after installing the 64 bit Linux, because GRUB is already in use before Win7 installation. That's a bit tricky. I'll try to install it at the external hard drive, so the GRUB should be untouched.

Gunther
Forgive your enemies, but never forget their names.

Rockoon

I always use separate hard drives for different OS's and I have gotten my OS installation system down to a science and doesnt require using external drives or other trickery, but it does require disconnecting drives during installations.

The first rule is to never have any hard drive connected to the system other than the one that is to receive the OS. This is important for several reasons, the first being because the last thing you want is the installation to overwrite the boot sector of any other OS, and I assure you that Windows will do exactly that if you arent installing to SATA1 or the IDE Primary Master. The second reason is that if any of your drives fail, or are removed, the others will still be bootable.

When all the OS's are installed, it is just a matter of telling the BIOS to boot from the most friendly multi-boot OS drive (such as the one with GRUB installed, which is default with many Linux's like ubuntu) and then configuring that to default to your favorite OS. In the event of problems, the BIOS hotkey during bootup can be used to manually avoid that default drive and boot from any other (even from USB thumb drives these days)
When C++ compilers can be coerced to emit rcl and rcr, I *might* consider using one.

Gunther

Quote from: Rockoon, September 09, 2010, at 08:05:59 AMI always use separate hard drives for different OS's and I have gotten my OS installation system down to a science and doesnt require using external drives or other trickery, but it does require disconnecting drives during installations.

Right, that's the secure method. Unfortunately, I would like to install Windows 7 at a laptop; that makes changing hard drives a bit difficult. But in principle is your way always to prefer.

Gunther
Forgive your enemies, but never forget their names.