flat assembler
Message board for the users of flat assembler.

Index > Main > ..

Author
Thread Post new topic Reply to topic
pool



Joined: 08 Jan 2007
Posts: 97
Location: Philippines
pool
..


Last edited by pool on 17 Mar 2013, 12:03; edited 1 time in total
Post 28 Aug 2008, 02:18
View user's profile Send private message Visit poster's website Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Code:
org 256
uninitialized db ?

dolar dw $
dolar_dolar dw $$

uninitialized_garbage db ?

    


dolar = 257
dolar_dolar = 256

uninitialized = 0 (because more DEFINED data or instructions followed and hence the space was padded with zero)
uninitialized_garbage = ??? (only known at run-time)

And of course, RTFM Smile
Post 28 Aug 2008, 02:39
View user's profile Send private message Reply with quote
asmhack



Joined: 01 Feb 2008
Posts: 431
asmhack
pool wrote:
i dont understand whats the value of $ and $$

assemble the code below and open the executable with ollydbg
you will find the answer alone, trust me Wink
even if you never used ollydbg before (well this is a good start..)

Code:
include 'win32ax.inc'

.code
go:
nop
mov eax,$
mov eax,$$
invoke ExitProcess,0
.end go
    


now the answer for your second question is also very easy to find...
just open the fasm.pdf, hit ctrl+f, write "?" in the textbox and hit enter...
Post 28 Aug 2008, 02:55
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17717
Location: In your JS exploiting you and your system
revolution
$ is the current assembly offset.
$$ is the offset of the beginning of the current section.
Post 28 Aug 2008, 06:06
View user's profile Send private message Visit poster's website 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 GitHub, YouTube, Twitter.

Website powered by rwasa.