News:

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

Update on moving to 64bit asm coding

Started by johnsa, January 27, 2009, 09:19:46 AM

Previous topic - Next topic

johnsa

Hey all,

Was wondering if there had been any movement yet towards 64bit in terms of the MASM package etc. I realize ML64 has been around for a while, but obviously we'd all need updated inc files etc. I'm thinking of starting to move to 64bit asm coding soonish but I'm not prepared to sacrifice all the libs/inc's and comfort features I have at present...IE: Id still want to use sockets lib, dx and any other api i feel like without having to build the inc files myself.

John

sinsi

Since 32-bit programs work just as well in 64-bit windows there won't be a great shift to 64-bit programming (my opinion...).
The thing with ml64 is the licence terms - I can't remember reading them so I don't know but I've heard it's only for drivers?

jdoe has his azimut project which has 64-bit stuff I think http://pages.videotron.com/jdoe, and there's always fasm (that's what I'm using at the moment).
Light travels faster than sound, that's why some people seem bright until you hear them.

johnsa

I'd mainly use it for commercial work under my MSDN license anyway, so I'm not so concerned about the terms, I don't think there is any restriction that it's only allowed for drivers?
I'm mainly keen on just having access to extra registers, don't really need 64bit integers often tbh...

sinsi

Once you work out the calling convention it's not too bad, although the best usage of registers can be a bit confusing ("sub rax,rax" vs "sub eax,eax").
Another good thing is that you don't have to worry about the cpu being 386/486, you can assume SSE2 (I think).
Light travels faster than sound, that's why some people seem bright until you hear them.

hutch--

John,

Although I have not bothered in that area Pelle's POASM apparently handles 64 bit assembler code correctly and uses relatively standard Microsoft/Intel notation so it may be a good choice if you want to play in 64 bit.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

sinsi

FASM is pretty good for 64-bit anything, has an invoke macro (terrible, but works) and incs.
Light travels faster than sound, that's why some people seem bright until you hear them.

BlackVortex

Quote from: sinsi on February 01, 2009, 05:24:09 AM
FASM is pretty good for 64-bit anything, has an invoke macro (terrible, but works)
You should work in marketing   :green

GregL

GoASM does 64-bit too. There are some tutorials here Writing 64-bit programs.

As soon as I get a new hard drive and Windows 7 Beta 64-bit installed, I'm gonna have a go at it.


sinsi

Quote from: BlackVortex on February 01, 2009, 07:09:43 AM
Quote from: sinsi on February 01, 2009, 05:24:09 AM
FASM is pretty good for 64-bit anything, has an invoke macro (terrible, but works)
You should work in marketing   :green
I hate macros at the best of times (as I've said in many a thread) but this is littered with

  sub rsp,params*8
  call win_api_thing
  add rsp,params*8
  sub rsp,params*8
  call other_winapi_thing
  add rsp,params*8

With the calling convention for win64 there's not really an 'elegant' solution for invoke (probably why ml64 doesn't have it). Thankfully, I write my code with 'push' and 'call' so I'm used to it  :bdg

With all those registers available, what brain-dead moron decided on rcx/rdx/r8/r9 (and only them)? ::)
Light travels faster than sound, that's why some people seem bright until you hear them.