flat assembler
Message board for the users of flat assembler.

Index > Windows > I know nothing :(

Author
Thread Post new topic Reply to topic
HarryTuttle



Joined: 26 Sep 2003
Posts: 211
Location: Poland
HarryTuttle 03 Dec 2004, 22:56
Confused
I started writting code
and stoped because of strange error message.
Fasm told me that label, I created, is an undefined symbol.

Maybe I'm so tired now and have no ability to see what's wrong with my code.
I look at this and have no idea how it could be possible.

uncheck the ';' sign used in section3 as a rem
and see it
I do not lie
http://andrewkahuna.webpark.pl/sockety1.zip

best THX for any sugestions,
h

P.S.>without those 4 lines it looks everything OK! but why?
Code:
;section3                                                                  ;
wminit:                                                                    ;
        jmp processed                                                      ;
                                                                           ;
wmcommand:                                                                 ;
        mov eax,[Wparam]                                                   ;
        mov [command],eax                                                  ;
        cmp eax,IDEXIT                                                     ;
        je wmclose                                                         ;
        cmp eax,IDCONNECT                                                  ;
        je .connect                                                        ;
 ;      cmp eax,IDPRINT         ;what's wrong with that four lines         ;
 ;      je  .print                                                         ;
 ;      cmp eax,IDSCAN                                                     ;
 ;      je .scan                                                           ;
        jmp processed                                                      ;
;---------------------------------------------------------------------------
;section4                                                                  ;
.connect:                                                                  ;
printf "connect"      ;not implementet                                     ;
invoke socket,2,1,0                                                        ;
       mov [h_sock],eax                                                    ;
       cmp eax,0                                                           ;
       je Error                                                            ;
invoke closesocket,[h_sock]                                                ;
       jmp processed                                                       ;
.scan:                                                                     ;
printf "scan"         ;not implementet                                     ;
        jmp processed                                                      ;
.print:                                                                    ;
                                                                           ;
printf "print"        ;not implementet                                     ;
        jmp processed                                                      ;
;--------------------------------------------------------------------------; 
    

_________________
Microsoft: brings power of yesterday to computers of today.
Post 03 Dec 2004, 22:56
View user's profile Send private message Reply with quote
mike.dld



Joined: 03 Oct 2003
Posts: 235
Location: Belarus, Minsk
mike.dld 04 Dec 2004, 08:17
Code:
macro printf [string]
{
local ..posit
local ..jump
jmp ..jump
..posit db string,0
..jump:
invoke MessageBox,0,..posit,..posit,0
}    
Post 04 Dec 2004, 08:17
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
HarryTuttle



Joined: 26 Sep 2003
Posts: 211
Location: Poland
HarryTuttle 04 Dec 2004, 10:34
Hi
I very thank You!!!


so, why exactly the error was symbol .scan or .print not defined?
how the macro was connected with labels?


best regards.

h

_________________
Microsoft: brings power of yesterday to computers of today.
Post 04 Dec 2004, 10:34
View user's profile Send private message Reply with quote
pelaillo
Missing in inaction


Joined: 19 Jun 2003
Posts: 878
Location: Colombia
pelaillo 04 Dec 2004, 14:02
You have the jump defined at label wmcommand.print and wmcommand.scan
Then, if themacro contains any global label, the destination becomes label.print and label.scan

My advice is to try to avoid global labels inside procedures, only locals.
Post 04 Dec 2004, 14:02
View user's profile Send private message Yahoo Messenger 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.