How do you view pb's asm output so you can edit it, and then run it back through the assembler?
EDIT: Two different solutions for viewing the PureBasic assembly output code are given 5 posts down.
viewing pb's asm output
viewing pb's asm output
Last edited by Tenaja on Wed Nov 23, 2011 7:23 pm, edited 2 times in total.
Re: viewing pb's asm output
Call the PB compiler manually using the /COMMENTED flag, modify the ASM file and call it again with the /REASM help.
There is a whole section in the help about this.
Although this feature seems cool it's not very useful because you'd have to change the ASM file every time...
There is a whole section in the help about this.
Although this feature seems cool it's not very useful because you'd have to change the ASM file every time...
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
Re: viewing pb's asm output
Yup, you are right... unless you have a Tool that runs every time...
And thank you. I have found the Command Line Compiler page in the help file.
And thank you. I have found the Command Line Compiler page in the help file.
Re: viewing pb's asm output
Is there no way to get the /COMMENTED asm file from within the IDE without creating a Tool?
Thanks again.
Thanks again.
Re: viewing pb's asm output
I don't think so. At minimum you have to write a simple batch file or something like that.
You should find something searching on the forum.
You should find something searching on the forum.
"Have you tried turning it off and on again ?"
A little PureBasic review
A little PureBasic review
Re: viewing pb's asm output
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:
http://purebasic.fr/english/viewtopic.php?f=12&t=30864
I am using srod's with success. Trond's has a link to another.
http://purebasic.fr/english/viewtopic.php?f=12&t=30864
I am using srod's with success. Trond's has a link to another.
srod wrote: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" :Now add the commentedASM.exe tool to the IDE tools menu by selecting "Configure Tools".Code: Select all
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
(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.
Trond wrote: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:
The advantage is that it pauses to show you the compilation error if any.Code: Select all
@echo off cd "c:\programfiler\purebasic 4\compilers" pbcompiler %1 /COMMENTED if errorlevel 1 goto wait start PureBasic.asm exit :wait pause