can anyone tell me how should I compile SSE assembly code?
You have to specify which assembler you are using. Are you having a problem with the instructions ? In MASM you must specify
.686
.MMX
[b].XMM[/b] ; <<< Enable SSE instructions
.model flat, stdcall
option casemap :none
masm which version?
btw donkey, does .XMM automatically add .MMX, or rather "set XMM/MMX level"? I think someone had problems with SSE code because he had .XMM first, followed by .MMX, but I could remember wrong.
Thanks f0dder,
Wasn't aware of that, all opcodes are intrinsically available in GoAsm so there are no directives.
masm which version?
Version 7 or above I believe, haven't used MASM for a while.
Wasn't aware of that, all opcodes are intrinsically available in GoAsm so there are no directives.
masm which version?
Version 7 or above I believe, haven't used MASM for a while.
Me too. I have only masm6. Where can i get masm7?
A link would be great.
A link would be great.
I don't know if there's a way to get it for free, legally. It's included with later versions of visual studio.
Will nasm compile this, then?
Or are there other free asm compilers which "understand" xmm instructions?
Or are there other free asm compilers which "understand" xmm instructions?
GoAsm is very close to MASM in syntax and will compile SSE and SSE2 instructions as well as branch hints for the P4 processor. Also I think that there was an instruction or two in MASM that was not available in SSE because of reserved symbol problems, this is not the case in GoAsm.
http://www.godevtool.com/
Not for the light of heart, there are none of the normal high level constructs like .IF or .WHILE etc... You have to actually code for real ;)
It does have some better features like Unicode and pushed strings etc....
invoke lstrlen, "Hello"
UString DUS "Unicode string",0
It comes with it's own linker, resource compiler and debugger and can be used with RadASM, I have includes for it on my site. If you have MASM modules that you do not wish to translate you can compile them as a static lib and import them directly into a GoAsm program.
You can find examples of GoAsm programs on my website.
http://www.godevtool.com/
Not for the light of heart, there are none of the normal high level constructs like .IF or .WHILE etc... You have to actually code for real ;)
It does have some better features like Unicode and pushed strings etc....
invoke lstrlen, "Hello"
UString DUS "Unicode string",0
It comes with it's own linker, resource compiler and debugger and can be used with RadASM, I have includes for it on my site. If you have MASM modules that you do not wish to translate you can compile them as a static lib and import them directly into a GoAsm program.
You can find examples of GoAsm programs on my website.
Great thanks.
If you want to work with the MASM, you can get it form the www.masm32.com
There you can get the MASM32 version 8, and it's free. And it works fine with RadASM.
There you can get the MASM32 version 8, and it's free. And it works fine with RadASM.
masm32v8 includes an old masm version. Besides, be sure to read the license and see in which ways it restricts your software development.
You're right f0dder. Sorry for the incorrect advice. I did not saw that the assembler is not updated.
So which is the best assembler to work with? What do you recommend for us? Will be the GoAsm package supported well?
Thanks for your advice.
So which is the best assembler to work with? What do you recommend for us? Will be the GoAsm package supported well?
Thanks for your advice.
The version included with masm32v8 (6.15.8803) does handle SSE, the catch is you must write the XMMx register names in uppercase. - XMM0 is valid, xmm0 isn't. There are still the license issues, though.
There's plenty of (free) assemblers out there, I think the two most interesting ones are fasm and GoAsm.
There's plenty of (free) assemblers out there, I think the two most interesting ones are fasm and GoAsm.
I used the MASM32 package, because it seemed easy to use for me.
I will try GoAsm and fasm too, I saw that there is a plenty of good coding hints on the GoAsm site.
I think masm32v8 has an include file for handling the SSE instructions, but i'm not sure. That's why the uppercase limitations.
I will try GoAsm and fasm too, I saw that there is a plenty of good coding hints on the GoAsm site.
I think masm32v8 has an include file for handling the SSE instructions, but i'm not sure. That's why the uppercase limitations.
Nah, masm handles it natively, at least the 6.15 version. If you look at ml.exe in a hex editor, you will see the registers and instructions.
Masm is probably a good place to start, it's the assembler that most people around here use, and the one with most sample code etc. And as long as you're not doing commercial applications with it, there shouldn't be any problems.
Masm is probably a good place to start, it's the assembler that most people around here use, and the one with most sample code etc. And as long as you're not doing commercial applications with it, there shouldn't be any problems.
I found the XMM registers in the "ml.exe".
I have only the 6.14.8444 version, but it contains the XMM extension.
Thanks.
I have only the 6.14.8444 version, but it contains the XMM extension.
Thanks.
Look for ml7. It has more support for SSE2 if I am not wrong.
Dear Donkey,
GoASM can do unicode very good
I think MASM can do Unicode very good too.
By using macro it can handle almost unicode char.
I see many of macros from this board
-Ernest Murphy
-Hutch
...
But any way if don't use macro we can do a little urly code:
GoASM can do unicode very good
I think MASM can do Unicode very good too.
By using macro it can handle almost unicode char.
I see many of macros from this board
-Ernest Murphy
-Hutch
...
But any way if don't use macro we can do a little urly code:
;Urly Unicode sample
;nhnpresario
.386
.model flat, stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\user32.lib
MessageBoxW proto :DWORD, :DWORD, :DWORD, :DWORD
.data
szText dw 'H','e','l','l','o',' ','U','n','i','c','o','d','e',0
szAppName dw 'T','e','s','t',' ','U','n','i','c','o','d','e',0
.data?
.code
start:
invoke MessageBoxW, 0, OFFSET szText, OFFSET szAppName, MB_OK
invoke ExitProcess, NULL
end start
That's not a very pretty way to do unicode ^_^. Iirc, the macros for masm have some problems with max string length, because of som silly masm line-length limitations.