flat assembler
Message board for the users of flat assembler.

Index > Windows > []

Author
Thread Post new topic Reply to topic
Spool



Joined: 08 Jan 2013
Posts: 154
Spool
[ Post removed by author. ]


Last edited by Spool on 17 Mar 2013, 10:51; edited 1 time in total
Post 14 Mar 2013, 14:30
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17341
Location: In your JS exploiting you and your system
revolution
You need to show more code to be able to give you a definitive answer. It depends upon how you define your code section and which version of Windows you are running.

If you define your code as execute only and you run a version of Windows that supports that attribute then you will encounter problems if you try to read or write the value.

But your code above will be okay no matter what because you never access the value stored there, you only get its address.
Post 14 Mar 2013, 15:07
View user's profile Send private message Visit poster's website Reply with quote
TightCoderEx



Joined: 14 Feb 2013
Posts: 58
Location: Alberta
TightCoderEx
This kind of declaration is perfectly acceptable and is not much different that putting in .const section. In either case, because it is in a read-only segment, you can't modify the contents.
Post 14 Mar 2013, 15:15
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17341
Location: In your JS exploiting you and your system
revolution
TightCoderEx wrote:
This kind of declaration is perfectly acceptable and is not much different that putting in .const section. In either case, because it is in a read-only segment, you can't modify the contents.
There is no restriction on code sections to always be read only. They can be writeable. And they can be non-readable and non-writeable.

A .const section could also be writeable. It would depend upon how the programmer defines the section.
Post 14 Mar 2013, 15:40
View user's profile Send private message Visit poster's website Reply with quote
Spool



Joined: 08 Jan 2013
Posts: 154
Spool
[ Post removed by author. ]


Last edited by Spool on 17 Mar 2013, 10:50; edited 1 time in total
Post 15 Mar 2013, 13:46
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1412
Location: Toronto, Canada
AsmGuru62
Why not? Stack room was invented for that (in part).
Post 15 Mar 2013, 16:54
View user's profile Send private message Send e-mail Reply with quote
Spool



Joined: 08 Jan 2013
Posts: 154
Spool
[ Post removed by author. ]


Last edited by Spool on 17 Mar 2013, 10:50; edited 1 time in total
Post 15 Mar 2013, 17:32
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1412
Location: Toronto, Canada
AsmGuru62
Ah!... premature optimization? Sweet!
I think the fact that you mixing code and data in one section will somewhat slow your code.
Maybe more than a couple of cycles for stack setup.
Post 15 Mar 2013, 21:14
View user's profile Send private message Send e-mail Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.