What does the ?DEBUG directive do in TASM? #211146
Discussion TypeProduct Feedback Discussion ContentBinary analysis has revealed that Turbo Assembler 5.3 (TASM) supports the undocumented ?DEBUG directive. How can I use this directive to add extra records to the OMF .obj output file? The ?DEBUG directive is undocumented, none of the Turbo Assembler manuals mention it, and a web search didn't give me any useful results. Here is a quick proof that the directive exists: $ strings tasm32.exe | grep DEBUG. .model tiny $ wine tasm32.exe /ml /m2 /zi t |
Replies: 2 comments
|
13 The ?DEBUG directive is used to communicate debugging information from higher-level languages; you can see it used when Turbo C & co. are asked to generate assembly language instead of binaries. This explains why it’s incompatible with /zd and /zi: if you’re processing a file with ?DEBUG directives, you want that debug information to end up in the object file, not the debug information produced by the assembler (pointing at the file it was given, which is presumably an intermediate form). So you can’t use ?DEBUG to add debug information to that produced by the assembler itself. The directive is followed by a single letter, and then any further arguments. From what I can tell so far, the letters are used as follows: V indicates some kind of version information Here are some actual examples showing the expected format: The directive itself is defined as “do nothing” macro if ??version doesn’t exist, presumably so it ends up ignored by (macro) assemblers that don’t support it: ?debug macro |
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
13
The ?DEBUG directive is used to communicate debugging information from higher-level languages; you can see it used when Turbo C & co. are asked to generate assembly language instead of binaries. This explains why it’s incompatible with /zd and /zi: if you’re processing a file with ?DEBUG directives, you want that debug information to end up in the object file, not the debug information produced by the assembler (pointing at the file it was given, which is presumably an intermediate form). So you can’t use ?DEBUG to add debug information to that produced by the assembler itself.
The directive is followed by a single letter, and then any further arguments. From what I can tell so far, th…