Using pbcompiler without running program
Posted: Thu Jan 24, 2019 8:39 pm
Occasionally I like to view the assembler generated by PB, I use the program below and modify the first line for the program I want to view. I found this code somewhere else in the forum. Is there someway to modify the call to the pbcompiler so that the program is not executed--just create the asm file? Something like a switch for pbcompiler like /NORUN.
Code: Select all
file$="timeloop.pb"
dir$ = GetPathPart(file$)
If file$ And FileSize(file$)>0
Compiler = RunProgram(#PB_Compiler_Home+"\Compilers\pbcompiler", Chr(34)+dir$+file$+Chr(34)+
" /commented", dir$, #PB_Program_Hide|#PB_Program_Wait)
If Compiler
dir$+"PureBasic.asm"
RunProgram("notepad.exe", dir$,"")
EndIf
EndIf