I don't remember where i found that option, it was a few years ago when i was working in a GcBasic debugger. Now i'm working on it again and i would like to debugg through the included files.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
/K: (or -K:) will cause some things from the original source to be kept in the generated assembly. /K:C will keep comments, /K:A will keep all source code, and /K:L will keep line numbers.
In the case of /K:L, line numbers are inserted above the code generated for that line. In the example, you posted, "F2L28S0I2" means:
- File 2 (File 1 is the main file, next are include files in the order found, then those included from lowlevel.dat).
- Line 28 in that file
- Subroutine 0 - which is the main subroutine. I just had a look at the compiler source and this hasn't been set correctly since 2009. I will correct this. Subroutine 0 is the main subroutine, then other subroutines are numbered in the order that they are found by the compiler.
- Line 2 of the subroutine.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello.
I'm compiling gcb files with /F:L option to get source line numbers in the asm file.
I get somethinglike this:
;Source:F2L28S0I2
Looks like it means:
F2 - file 2
L28 - line 28
Is there any way to know wich file is "file 2" ??
And.. what does mean the remain part: ...S0I2 ??
Thank you in advance.
Hello,
So, I can help. Please provide.
Can you post the whole command line please?
What version ?
Where did you see those switches? Which document?
Thanks
Hi Anobium.
Version:
Great Cow BASIC (0.94 2015-08-05)
Command:
gcbasic -NP -A:GCASM -K:L -O:file.asm file.gcb
I don't remember where i found that option, it was a few years ago when i was working in a GcBasic debugger. Now i'm working on it again and i would like to debugg through the included files.
I'd completely forgotten about that option!
/K: (or -K:) will cause some things from the original source to be kept in the generated assembly. /K:C will keep comments, /K:A will keep all source code, and /K:L will keep line numbers.
In the case of /K:L, line numbers are inserted above the code generated for that line. In the example, you posted, "F2L28S0I2" means:
- File 2 (File 1 is the main file, next are include files in the order found, then those included from lowlevel.dat).
- Line 28 in that file
- Subroutine 0 - which is the main subroutine. I just had a look at the compiler source and this hasn't been set correctly since 2009. I will correct this. Subroutine 0 is the main subroutine, then other subroutines are numbered in the order that they are found by the compiler.
- Line 2 of the subroutine.
Hi Hugh.
Thank you very much for the information. It will be very useful.