Page 1 of 1

compile to asm

Posted: Wed Dec 11, 2002 8:42 pm
by BackupUser
Restored from previous forum. Originally posted by tejon.

Code: Select all

rem a small batch file for beginners that compiles your
rem basic program with the commented option. ( to output asm )
rem just save this as a batch file, create a shortcut on the desktop
rem and drag and drop your basic program, you will then get yourprogram.pb.asm
rem on the same path as yourprogram.pb
rem 
%temp=%path%
path=C:\Program Files\PureBasic\Compilers;%path%
pbcompiler %1 /COMMENTED
path=%temp%
copy "C:\Program Files\PureBasic\Compilers\PureBasic.asm" %1.asm

Posted: Wed Dec 11, 2002 9:02 pm
by BackupUser
Restored from previous forum. Originally posted by MrVainSCL.

Fred,
would be nice to have an option in the compiler menu like "Create Executeable" and "Create AsmOutput" ... What do you think?



PIII450, 256MB Ram, 80GB HD + 6,4 GB, RivaTNT, DirectX8.1, SB AWE64, Win2000 + all Updates...

greetz
MrVainSCL! aka Thorsten

Posted: Fri Dec 20, 2002 2:45 am
by BackupUser
Restored from previous forum. Originally posted by tejon.

Code: Select all

'same thing in VbScript
'save this with vbs extention

set fs=CreateObject("Scripting.FileSystemObject")
Set Args=WScript.Arguments
if Args.Count>0 then
   file_name = Args(Args.Count-1)
   file_path = left(file_name,InstrRev(file_name,"\"))
   base_name = fs.GetBaseName(file_name)
   Set ws=WScript.CreateObject("WScript.Shell")
   double_quote=""""
   appfile = double_quote+"C:\Program Files\PureBasic\Compilers\PBCompiler.exe "+double_quote
   userfile = double_quote+file_name+double_quote
   ws.Run(appfile&userfile&" /COMMENTED")
   if (fs.FileExists("C:\Program Files\PureBasic\Compilers\PureBasic.asm")) then
      fs.CopyFile "C:\Program Files\PureBasic\Compilers\PureBasic.asm",file_path+base_name+".asm"
   end if
end if