Ability to see the /COMMENTED assembly code in a split windo

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
LJ
Enthusiast
Enthusiast
Posts: 177
Joined: Wed Apr 30, 2003 4:00 pm

Ability to see the /COMMENTED assembly code in a split windo

Post by LJ »

Ability to see the /COMMENTED assembly code in a split window right next to the Purebasic code, or in the Debug window when you click on the Asm button, underneath the register monitor, a Window that shows the assembly code. The idea is to save time from having to go to console and type in /COMMENTED command to compile special assembly version, then open up .asm file with either notepad, Word, whatever, then go back into Purebasic, make a change, save the .pb file, then go back to console, re-compile using /COMMENTED tag, etc... Somehow integrate the option to see the assembly code into the Purebasic main GUI.

Now that would rock!
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Ability to see the /COMMENTED assembly code in a split w

Post by PB »

> Now that would rock!

Agreed. Good way to teach a bit of ASM, too.
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

What about that one for now?

Code: Select all

; Compile to exe, and add to 'Tools' Menu.
; Set 'Arguments' in Toolsmenu to "%TEMPFILE" (include the ")

; Enter your PB directory here:
#purebasic = "C:\PureBasic\"

RunProgram(#purebasic+"Compilers\pbcompiler.exe", Chr(34)+ProgramParameter()+Chr(34)+" /COMMENTED", #purebasic+"Compilers\", 1|2)
RunProgram(#purebasic+"PureBasic.exe", Chr(34)+#purebasic+"\Compilers\PureBasic.asm"+Chr(34), #purebasic)
End
See ASM source with 2 clicks (or set a Keyboard shortcut.)

Timo
quidquid Latine dictum sit altum videtur
LJ
Enthusiast
Enthusiast
Posts: 177
Joined: Wed Apr 30, 2003 4:00 pm

Hmmm...

Post by LJ »

That's an inventive solution there...lol... sort of makes me think of how this television character would always get himself out of tight situations by taking whatever he could find laying around and jimmy it to get out of a tight jam. I applaud your thinking of using the RunProgram parameter as a work around, but this is far from having the functionality I mentioned in the first message of this thread. Nevertheless, brilliant thinking and funny too. :lol:
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

Freak: Your example code doesn't work? I've compiled the exe and
added it to the Tools, but when I select it (with a source loaded) nothing
happens?
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

Mmm, did you add the " 's around %TEMPFILE ?
If there are spaces in the path, it is interpreted as 2 arguments.

And if there is an error in the code you try to see, ít won't work, because
the compiler will not create the .asm file.

Timo
quidquid Latine dictum sit altum videtur
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

Got it working... had only the exe listed for the Command Line in the
tools editor... seems you need the entire path + exe. :oops:
User avatar
waffle
Enthusiast
Enthusiast
Posts: 129
Joined: Mon May 12, 2003 1:34 pm
Location: USA
Contact:

Post by waffle »

this is a cool tip, but there is a bug...

i can't seem to generate a .asm file if the source
has a call to an included file. Is this a new PB bug?
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

waffle: It works quite fine here.

Timo
quidquid Latine dictum sit altum videtur
User avatar
waffle
Enthusiast
Enthusiast
Posts: 129
Joined: Mon May 12, 2003 1:34 pm
Location: USA
Contact:

Post by waffle »

bug.zip - this link removed 1/6/04 by waffle (me)

try it with this project.

also has a compilier bug, posted in bug forum.
but the source does compile, just not to asm...

Compiler bug fixed in 3.82
I haven't tested the make .asm yet to see if thats fixed...
Its not a major issue for me at this time.
Post Reply