flat assembler
Message board for the users of flat assembler.

Index > Windows > What is error with this code???

Author
Thread Post new topic Reply to topic
unknow



Joined: 27 Jun 2012
Posts: 1
unknow
Image

this is my code:

Code:
include 'win32wx.inc'

proc func arg1, arg2

mov     eax, eax
mov     ebx, ebx
.label1:
        ret
func_ret:
        ret
endp
label1_size = $ - .label1          


Last edited by unknow on 04 Jan 2013, 04:58; edited 1 time in total
Post 04 Jan 2013, 04:47
View user's profile Send private message Reply with quote
pool



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


Last edited by pool on 17 Mar 2013, 12:21; edited 1 time in total
Post 04 Jan 2013, 04:56
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
unknow, the image is impossible to see for us, the server simply resets the connection. The source you provided is not compilable, this one fixes the problems:
Code:
include 'win32wx.inc'

proc func arg1, arg2

mov     eax, eax
mov     ebx, ebx
.label1:
        ret
func_ret:
        ret
endp
dummy = func ; To cause "func" to be used which will convince proc macro not to remove the procedure
label1_size = $ - func.label1 ; Not just ".label" because "func_ret" hid it (another fix is to change "func_ret:" with ".func_ret:" so you don't create a new namespace and thus both labels are under the same scope)    
Post 04 Jan 2013, 06:10
View user's profile Send private message 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.