You are here: PSPad forum > English discussion forum > Compiler Parameters Redirection

Compiler Parameters Redirection

#1 Compiler Parameters Redirection

Posted by: atrionfo | Date: 2013-11-04 19:01 | IP: IP Logged

I'm using Windows 7 64-Bit with PSPad 4.5.7. I am setting up the compiler settings for use with the Motorola 68HC11 compiler called AS11. In order to create a LOG file when assembling programs from the command line (NOT under PSPad) I use this command:

program.asm -l > program.lst

I have to use the redirection operator because otherwise the log file appears on the screen. I have set up PSPad to assemble the file and it works fine using this command:

%Name%%Ext% -l > %Name%.LST

In this case, the redirection operator is ignored. I am able to capture the log file using "Capture Program Output Window," but that just places the output into the log area at the bottom of the PSPad screen. I'm aware that I can scroll through this, but it takes time. Worst of all is that this slows down the assembly process because all of the output has to be be displayed as the program assembles. Also, then there doesn't appear to be a way to save the log from the log window.

Is there a way to use the redirection operator like I normally would on the command line?

Thanks.

Options: Reply | Quote | Up ^


#2 Re: Compiler Parameters Redirection

Posted by: pspad | Date: 2013-11-04 20:13 | IP: IP Logged

You can use simple batch file for redirection.
For capture log, go to program settings / Program 2 and ensure option Follow compilation progress in LOG isn't checked.

Options: Reply | Quote | Up ^


#3 Re: Compiler Parameters Redirection

Posted by: atrionfo | Date: 2013-11-05 03:38 | IP: IP Logged

pspad:
You can use simple batch file for redirection.

It's been many years since I've written my own batch files. I guess what I need is a quick tutorial on passing variables from the command line. For instance, I'll want to name the LISTing file program.lst, with the program name filled in from the command line. Can you point me to a quick tutorial or refresher on this?

pspad:
For capture log, go to program settings / Program 2 and ensure option Follow compilation progress in LOG isn't checked.

Wow, that sure made a big difference. Thanks!

Options: Reply | Quote | Up ^


#4 Re: Compiler Parameters Redirection

Posted by: Stefan | Date: 2013-11-05 18:41 | IP: IP Logged

%Name% and %Ext% are PSPad arguments.

.

.

Instead of an compiler you can call a batch file
and pass this args as parameters like:

myBatch.cmd "%Name%" %Ext%

.

.

Inside the batch you can access the provide arguments by %1 and %2, like:

@ECHO OFF
REM %Name%%Ext% -l > %Name%.LST
"%1.%2" -l > "%1.LST"

:EOF

.

.

--
Stefan (pleased user since 1722)
Do you know you can spend Jan a beer? (click here)
Inofficial FAQs + Infos + Special Settings

Options: Reply | Quote | Up ^


#5 Re: Compiler Parameters Redirection

Posted by: atrionfo | Date: 2013-11-06 20:11 | IP: IP Logged

Stefan:
Inside the batch you can access the provide arguments by %1 and %2, like:

@ECHO OFF
REM %Name%%Ext% -l > %Name%.LST
"%1.%2" -l > "%1.LST"

That worked fine and I was able to create the log file. However, I'm using Windows 7 and once I moved the AS11 assembler into "C:\Program Files (x86) ", then as11.exe couldn't be found anymore. So I added it to the path and that fixed that problem. Once that was fixed then the redirection was being ignored (or not passed at all), so I implicitly stated the parameters as:

C:\Program Files (x86)\AS0_and_AS11_Assemblers\%Name%%Ext%

Now I get "Access is Denied" when I try to assemble the file. Is there a workaround for this? Or am I now passing the parameters incorrectly? Would it just be best to keep the AS11.EXE out of the program folders?

Options: Reply | Quote | Up ^


#6 Re: Compiler Parameters Redirection

Posted by: Stefan | Date: 2013-11-06 20:29 | IP: IP Logged

.

Probably just give the group USERS
the right MODIFY on C:\Program Files (x86)\AS0_and_AS11_Assemblers\

???

.

Options: Reply | Quote | Up ^


#7 Re: Compiler Parameters Redirection

Posted by: pspad | Date: 2013-11-06 20:46 | IP: IP Logged

No program has rights to write into Program files folder on Vista and above. Only Windows installer group has right to write there.
Forgot on compile/write logs e.t.c. into Program files folder.

Target log and result of your compilation outside of program files or (if not possible) move whole assembler out of Program files folder.

Edited 1 time(s). Last edit at 2013-11-06 20:47 by pspad.

Options: Reply | Quote | Up ^


#8 Re: Compiler Parameters Redirection

Posted by: Stefan | Date: 2013-11-08 18:27 | IP: IP Logged

pspad:
No program has rights to write into Program files folder on Vista and above.

On default, yes. That's why I said we can grand write access for the group USERS ourself.

.

--
Stefan (pleased user since 1722)
Do you know you can spend Jan a beer? (click here)
Inofficial FAQs + Infos + Special Settings

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR