NASM - The Netwide Assembler

NASM Forum => Example Code => Topic started by: Tania on May 28, 2008, 02:37:09 PM

Title: Doubt_ Assembly
Post by: Tania on May 28, 2008, 02:37:09 PM
Hi .. Good afternoon.

I am developing a program in assembly language and I would like to see clarified a doubt. How do I know what is the last memory position of the code of the program. How can I find it? I need of your help!(Please)
Title: Re: Doubt_ Assembly
Post by: nobody on May 28, 2008, 06:22:00 PM
Put a label there.

The question is, where do you want the label? Do you want the end of literal executable code, or including ".data" and ".bss", if any? If there's a linker involved, you may need to figure out what the linker thinks is "last" - or figure out how to *tell* it what you want "last".

Give us more information about what you're doing (usually when they don't mention "What OS?", it's Windows... sigh), and perhaps we can provide an actual example...

Best,
Frank
Title: Re: Doubt_ Assembly
Post by: nobody on May 30, 2008, 04:45:08 AM
> when they don't mention "What OS?", it's Windows... sigh

Very true :-(

> is the last memory position of the code

Note that writing above this address might still not be safe ...