Got it. I will add it here, so it is in the Assembly forum. This is the source thread, showing both IDE and Batch File methods:
I am using srod's with success. Trond's has a link to another.
just a simple tool which you may or may not find of some use. All it does is take the current source you have open in the PB IDE and generates the corresponding assembly code and loads it into notepad etc.
Compile to "commentedASM.exe" : Code:
file$=ProgramParameter(0)
dir$ = GetPathPart(file$)
DeleteFile(dir$+"PureBasic.asm")
If file$ And FileSize(file$)>0
Compiler = RunProgram(#PB_Compiler_Home+"\Compilers\pbcompiler", Chr(34)+file$+Chr(34)+" /commented", dir$, #PB_Program_Hide|#PB_Program_Wait)
dir$+"PureBasic.asm"
If Compiler And FileSize(dir$)>=0
RunProgram("notepad.exe", dir$,"")
Else
MessageRequester("Error!", "There was an error creating the assembly code file.")
EndIf
EndIf
Now add the commentedASM.exe tool to the IDE tools menu by selecting "Configure Tools".
(Make sure that you select the name of the commentedASM.exe (with full path) in the CommandLine option.
In the 'Arguments:' control enter "%TEMPFILE" with the quotes. Select the 'Run Hidden' checkbox.)
**EDIT : change the command RunProgram("notepad.exe", dir$,"") to simply RunProgram(dir$) if your system is set up to deal directly with .asm files etc.
I won't say that
I already made this (oups there I said it), because I'm not using it any more. Instead I use a bat file:
Code:
@echo off
cd "c:\programfiler\purebasic 4\compilers"
pbcompiler %1 /COMMENTED
if errorlevel 1 goto wait
start PureBasic.asm
exit
:wait
pause
The advantage is that it pauses to show you the compilation error if any.