| View previous topic :: View next topic |
| Author |
Message |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Tue Oct 30, 2007 12:54 pm Post subject: [asm] question about base address |
|
|
i'm a little confuse..
i had question that goes like that:
there's a data segment and the base address starts at 1000H
now my question is . does the base address is growing by 1 every cabin
like :
first cabin 1000H
2nd 1002H and go on...
or does it stays 1000h for all the segment?
_________________
Stylo |
|
| Back to top |
|
 |
The Dami3n Master Cheater
Reputation: 1
Joined: 15 Nov 2006 Posts: 441 Location: Mulkerolandia
|
Posted: Tue Oct 30, 2007 1:22 pm Post subject: |
|
|
oh yeah base address, lol...
nvm
_________________
Last edited by The Dami3n on Wed Oct 31, 2007 12:33 am; edited 1 time in total |
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Tue Oct 30, 2007 1:55 pm Post subject: Re: [asm] question about base address |
|
|
| 1qaz wrote: | i'm a little confuse..
i had question that goes like that:
there's a data segment and the base address starts at 1000H
now my question is . does the base address is growing by 1 every cabin
like :
first cabin 1000H
2nd 1002H and go on...
or does it stays 1000h for all the segment? |
Not exactly sure what you are saying here.. But if you are refering to a base address for memory sections. The base address is the base for that entire section.
So you will have offsets for anything over the base. Say your base is 1000h like you said. You would have something like this:
Base+0001h = 10001h
Base+0002h = 10002h
Base+0003h = 10003h
Base+0004h = 10004h
And so on. The base address is simply the start of the memory section that is allocated for a set size to hold the data. The base address for that section is used throughout that entire section. When you get to the next section, the base for that next section will not be the same.
_________________
- Retired. |
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Tue Oct 30, 2007 2:00 pm Post subject: |
|
|
oh okai so the base address isnt changing in the same section
but i wonder why the question goes like: "STARTS" at 1000h isnt it wierd
cuz when i see STARTS at... it should be change S:
anyway thanks =]
_________________
Stylo |
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Tue Oct 30, 2007 2:04 pm Post subject: |
|
|
The base can change if the section is relocated and such. Things like DLLs change often because of what they are, Dynamic. PE files (Portable Executables) and such on Windows compile with a suggested base address which they first attempt to load into, if the base is taken, they are relocated elsewhere. The base address can be obtained using CreateToolhelp32Snapshot API using Module32First / Module32Next to filter through the module list of the process. (Or you can go into the kernel layer and use the NT API.)
_________________
- Retired. |
|
| Back to top |
|
 |
sponge I'm a spammer
Reputation: 1
Joined: 07 Nov 2006 Posts: 6009
|
Posted: Tue Oct 30, 2007 5:17 pm Post subject: |
|
|
eh seems like he saw the PE header, which the section it occupies is usually 1000 bytes large.
_________________
|
|
| Back to top |
|
 |
|