Page 1 of 1

[Solved] Does NASM or YASM support defining line numbers?

Posted: Mon Dec 21, 2020 1:06 pm
by pvc
I have some automatically generated assembly code in NASM/YASM flavor and I would like to add source line numbers to it. GNU assembler has .file and .loc directives for that purpose. Does NASM or YASM have some equivalent to that?

Re: Does NASM or YASM support defining line numbers?

Posted: Mon Dec 21, 2020 3:18 pm
by alexfru
Check out the %line directive in your copy of nasmdoc.txt.

Re: Does NASM or YASM support defining line numbers?

Posted: Mon Dec 21, 2020 3:59 pm
by pvc
My copies of NASM and YASM both came with no documentation but… whatever.
That's exactly what I was looking for. Big thanks.