write code to direct address

I try to write some codes to rest space of MCU's flash ROM (behind my program), so I should know the lastest byte of my program.
How to do all of these?

More questions in this forum