Well, it's just a question...

I've tried to use RadASM for developing 64bit applications (XP64/2K3-64). Also i want to see where the problems are. I use masm64, 64Bit API Calls, Structs, Consts etc. (Yeah, that's why i want multiple ".API" files and it's possible since Normal compilation (manual by using an editor and create via console) is possible...

Masm64 differs - as usual - from masm32. Serveral things work already, serveral not.
Default instructions of IA64/Amd64 work (stored in masm64.ini), thats not the problem. In general, RadASM has no problem, only the handling differs...

Statements : -> Use "//" instead of ";" -> Syntax Hilightning and ";;" instruction (Yes, [b]masm64 instruction[/b])
Procedures : -> Usage of ".proc name,..." - ".endp name,..." instead of "myProc proc ..." - "myProc endp"
PseudoOps : -> e.g. "brp.ret.dptk.many.nt.nt.imp" -> use point as seperator inside instructions
Registers : -> e.g. "ar16" == "ar.rsc" -> use point as seperator for registers (pseudo-regs)

The idea to create structs (inside masm64Struct.api) for registers/pseudo ops with points in order to use them will be obsolete work.
I didn't find a way (by changing the line "6=$ proc,{T}{C}{I}{T},{C}{I}{T}ret{C}{C}{I}{$} endp" to get the correct output for procedures. Maybe i missed something)

I understand if it is not possible at the moment. But maybe it will show up trouble to avoid in (far) future ;)
As i told before, only a question. I know that this implementation (64bit compatibility) might end up in a coding nightmare to keep both versions (32bit / 64bit) running. Maybe it will end up in RADASM64 :)

And in 64bit, i'm able to "mix" the whole shit (32bit and 64bit usage) ... ;)

Regards, Pegasus
Posted on 2004-03-24 18:08:03 by cu.Pegasus

Currently, how many members of the board are using masm64? :)
Posted on 2004-03-25 12:21:39 by Vortex
Hi cu.Pegasus,

It would not be difficult to create an INI file for masm64. You have simply to enter the rules for the assembler like any other. For example:

Code=endp $,proc $


proc MyProc

endp MyProc

This is what I did when I wanted RadASM to support GoAsm, I wrote my own implementation. We can't have Ketil do everything for us ;)

If you have a working masm64 program email it to me and I will take a look at it if you don't feel up to it. I have MASM64 but it is an older version :

Microsoft (R) Macro Assembler (x86-64) Version 8.00.2207

Never figured out how to specify STDCALL or use the procs.
Posted on 2004-03-25 12:29:18 by donkey
Found a solution for pseudo-ops and regs....

I made a mistake while entering them into api struct file. After rewriting the files, it works.
And by using structures, it shows a box with possible values for regs/ops ;)

I'm so glad we have multiple api files now :grin: ....

@donkey: Me is using the same version of ml64.exe (Date: 25.03.03)
Posted on 2004-03-25 16:44:19 by cu.Pegasus

I looked at it for about 2 seconds again and still can find no way to specify STDCALL, the option that is apparently for that purpose /Gz does not work, OPTION LANGUAGE:STDCALL does not work. Your thing about:

.proc name,...

just results in errors. However:

name proc

name endp

Works fine, as long as you do not specify any parameters because there is no way I could find to specify a language type. The registers are pretty screwed up. RAX is fine but it allows mov ax,0FFFFFFFFFFh. For the most part it looks like a badly thrown together hack of a program and is only for use in assembling a few opcodes for the x86-64. Though it does seem to support much of the new instruction set even that is incomplete. Also I could not find a way to make invoke work at all, it is not even recognized as a keyword.

I think we have to wait a bit to see if Microsoft decides to actually make masm64 something useful, for now they seem to have gutted it to remove the ability to make standalone masm apps. If you have found a way to specify STDCALL and have a proc that uses parameters I would be interested in seeing it because I could not figure it out.
Posted on 2004-03-25 17:59:37 by donkey
I think you're right. We have to wait until a usable version is avail.
Several assemblers - for Linux64bit - are more useful then masm64 for Windows64.

.align 32
.section .text

.proc demo
demo:: ld4 r32 = [r32]
mov r55 = r24
add r44 = 32, r10
mov r17 = 3
cmp.le p15,p0 = r32,r0
add r32 = -1,r32
(p15) br.cond.spnt.few j_loop_end
add r55 = r44, r43
fadd f6 = f4, f6
nop.m 0
(p17) ld8 r40 = [r50]
(p16) add r50 = r40,r0
nop.f 0
br.ctop.sptk.few j_loop
br.ret.sptk.few b0

masm64 is driving nuts with the shown codepart above, while IAS is able to interpret it...
Posted on 2004-03-26 01:53:10 by cu.Pegasus
Doesn't quite compile using MASM64, I assume that is for inline asm. This just confirms the suspicion I have that MS has gutted MASM64 and has no intentions of making a useful version. BTW that is one of the reasons I switched to GoAsm, Jeremy is already thinking of a 64 bit version.
testmasm.asm(1) : error A2008: syntax error : .

testmasm.asm(2) : error A2008: syntax error : .
testmasm.asm(4) : error A2008: syntax error : .
testmasm.asm(5) : error A2034: must be in segment block
testmasm.asm(6) : error A2008: syntax error
testmasm.asm(7) : error A2008: syntax error
testmasm.asm(8) : error A2008: syntax error
testmasm.asm(10) : error A2034: must be in segment block
testmasm.asm(11) : error A2008: syntax error
testmasm.asm(12) : error A2008: syntax error
testmasm.asm(14) : error A2008: syntax error : (
testmasm.asm(16) : error A2008: syntax error
testmasm.asm(17) : error A2008: syntax error
testmasm.asm(18) : error A2008: syntax error : .
testmasm.asm(19) : error A2008: syntax error : p17
testmasm.asm(21) : error A2034: must be in segment block
testmasm.asm(22) : error A2008: syntax error : p16
testmasm.asm(23) : error A2008: syntax error : .
testmasm.asm(24) : error A2008: syntax error : br
testmasm.asm(26) : error A2034: must be in segment block
testmasm.asm(27) : error A2008: syntax error : br
testmasm.asm(29) : error A2008: syntax error : .
testmasm.asm(58) : error A2008: syntax error : .
testmasm.asm(59) : error A2008: syntax error : .
testmasm.asm(61) : error A2008: syntax error : .
testmasm.asm(62) : error A2034: must be in segment block
testmasm.asm(63) : error A2008: syntax error
testmasm.asm(64) : error A2008: syntax error
testmasm.asm(65) : error A2008: syntax error
testmasm.asm(67) : error A2034: must be in segment block
testmasm.asm(68) : error A2008: syntax error
testmasm.asm(69) : error A2008: syntax error
testmasm.asm(71) : error A2008: syntax error : (
testmasm.asm(73) : error A2008: syntax error
testmasm.asm(74) : error A2008: syntax error
testmasm.asm(75) : error A2008: syntax error : .
testmasm.asm(76) : error A2008: syntax error : p17
testmasm.asm(78) : error A2034: must be in segment block
testmasm.asm(79) : error A2008: syntax error : p16
testmasm.asm(80) : error A2008: syntax error : .
testmasm.asm(81) : error A2008: syntax error : br
testmasm.asm(83) : error A2034: must be in segment block
testmasm.asm(84) : error A2008: syntax error : br
testmasm.asm(86) : error A2008: syntax error : .
Posted on 2004-03-26 03:06:15 by donkey

I currently use Yasm 0.3, I develop on my Opteron under DOS :grin: (rather : starting from DOS, and entering 64-bit long mode. Ad : can somebody do the same as me WITH INT/IRQ 64-bit support ? I'd be REALLY interested, dunno why it bugs :().

So Yasm is quite useful, available for DOS/Win/Linux.
Nasm64 is going to be widespread (soon ? Xmas ?) too.
ML64.EXE : does not work
And of course I develop my own one (since yesterday :grin: ) I currently waste too much time because of the lack of a 64-bit debugger.

Of course Radasm/Masm32/Ollydbg/vkdebug are nice, but 10-year old TurboC 1.0 visually shows/traces your source/binary with such an ease... I wonder if somebody here (including me) could do it.
Posted on 2004-03-26 05:51:08 by valy
Hi valy,

I don't know of any good 64 bit debugging tools either. It will be a while before they catch up I geuss. I am not too worried about it as GoBug is always developped in step with GoAsm and when the 64 bit GoAsm comes out I am sure to have a 64 bit dedicated debugger as well.
Posted on 2004-03-27 11:23:48 by donkey
How would I go about downloading MASM64? Didn't even know they pumped it out yet. I know this thread is about MASM, but if MASM64 can't make stand-alone apps yet, has anybody here messed with GNU's gas?
Posted on 2004-09-27 18:30:30 by Al_Leitch