2010-01-11

(mis)use of Programmers Notepad (PN2) as BASCOM IDE (Part 2: Tools)

(This post was updated on 23. august 09, dismiss anything older!!)

As I wrote in part 1 this part is a little tricky because BASCOMP.EXE was made by deep thought :)

First of yll you need the following batch scipt, download it here: dowload it from here.
You can put it to the bascom installation folder (recommended) or to any other folder you like.

Now you must decide if you want to define an environment variable called BASCOM_HOME or not. If you do so, my batchfile only needs one parameter: the basic source file.


If you do not define it, you must supply the complete path (with filename) of BASCOMP.EXE as first parameter and the source file as second parameter.

Next open PN2 (which already should do proper syntax coloring :) ) and open the menu "TOOLS/OPTIONS".

First I show you the tool setup if you have defined BASCOM_HOME:
Select the "Bascom Basic" scheme, click "Add", and fill the tool properties - don't do a typo, look careful, the double quotes are important!
You may decide to define a shortcut too, e.g. F7 or whatever.

Before hitting OK switch to console I/O tab, select "look for custom pattern" and enter file : %f : %l in the box (there are single spaces between the dots and args), exaclty like this:

Now the tool definition without the environment variable. Browse to the pn2compile.cmd to fill the command, copy the full patch of bascomp.exe including filename and enclosed in double quotes to the parameter field, append a space, and then enter "%d%f" (again with double quotes). The console I/O settings are identical.


Now give it a try: load one of your bascom sources, click "TOOLS/COMPILE" and see what happens. On my system it looks like this (of course our focus is the output portion below the source code. If there is nothing hit F8 or use menu "View/Output" to switch it on):


On my system the error parsing works fine, if there are errors, clicking on them in the output (even if it was not opened before. I argue that it nredirects PN2 to open the file and jump to the proper lineevertheless needs to be part of the project).

That said, I'd like you to test and comment this, and maybe improve it and share it back with me. Look forwar to the next part :)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.