View Full Version : How do you display the code lines?

- 12th June 2017, 12:34
Okay, another basic question. You have a program and you can see the line numbers in the left margin in the editor. How do you print these line numbers with your code?

- 12th June 2017, 16:08
Try this http://melabs.com/resources/debugmon.htm

It add lot of overhead code, but it can work. You wont get line numbers, but you can have PC address, and your subroutine will be called after each PBP line.
You can search net for additional information, but as far as I know .COFF file contains relation between PC and line no. But I didn't found how to parse .coff file.

- 12th June 2017, 17:06
I probably did not explain this correctly. When you write code in PBP there is a margin on the left that shows line numbers. When you print your code to share with someone else, how can you / do display these numbers so you can tell someone where you are looking or where you want them to look?

- 12th June 2017, 17:53
...line numbers with your code?
I was thinking that you ask how to print line number using code... Some thing like source debugger.
I actually newer printed code, so...

- 12th June 2017, 18:46
Hi Ed,
You don't write code in PBP, PBP is the compiler.
You use a text editor or IDE to write the code. How to enable printing of line number depende on what text editor or IDE you're using.

If you're using MicroCodeStudio then I don't think you CAN print the line numbers. If that's the case I suggest you download Notepad++ and open the file in that for Printing. It's got an option to print line numbers.

If you're using MPLAB8 or MPLABX I don't know if it's possible to print the line numbers, I don't have those installed on this machine so I can't check.