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

Programming, for all ages and all languages.
Post Reply
User avatar
pvc
Member
Member
Posts: 201
Joined: Mon Jan 15, 2018 2:27 pm

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

Post 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?
Last edited by pvc on Mon Dec 21, 2020 4:00 pm, edited 1 time in total.
alexfru
Member
Member
Posts: 1111
Joined: Tue Mar 04, 2014 5:27 am

Re: Does NASM or YASM support defining line numbers?

Post by alexfru »

Check out the %line directive in your copy of nasmdoc.txt.
User avatar
pvc
Member
Member
Posts: 201
Joined: Mon Jan 15, 2018 2:27 pm

Re: Does NASM or YASM support defining line numbers?

Post 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.
Post Reply