flat assembler
Message board for the users of flat assembler.

Index > Main > undefined symbol, why ?

Author
Thread Post new topic Reply to topic
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji
Code:
(A)
---
include 'win32a.inc'

mov eax, proc_1
proc proc_1
.toto:
nop
endp

jmp .toto
    
Code:
(B)
---
include 'win32a.inc'

mov eax, proc_1

jmp .toto

proc proc_1
.toto:
nop
endp

    


(A) : OK
(B) : doesn't compile

why ?

"proc/endp" does not isolate the code before and after, only before ?
I also note that nested procs are allowed, is that correct ?

Code:
macro define@proc name,statement
{ 
      local params,flag,regs,parmbytes,localbytes,current

     name:

    

in fact, "proc" is just this ...

Global_Label :
├ępilog
code
prolog

and nothing else, correct ?

thank you

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 30 Jul 2010, 08:29
View user's profile Send private message Send e-mail Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17279
Location: In your JS exploiting you and your system
revolution
Did you deliberately remove one line?
Code:
macro define@proc name,statement
 { local params,flag,regs,parmbytes,localbytes,current
   if used name ;<--- What is this?
   name:    
Post 30 Jul 2010, 08:55
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: 17279
Location: In your JS exploiting you and your system
revolution
This won't compile
Code:
jmp .loop
proc_1:
   .loop:    
You have too give the full label name:
Code:
jmp proc_1.loop
proc_1:
   .loop:    
Post 30 Jul 2010, 08:57
View user's profile Send private message Visit poster's website Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji

"Did you deliberately remove one line? " ...

I took this copy/paste into "my" modified file, sorry.
(but my question was about the use of the original file)

Remove this line allows access to the code even if it is not referenced.
For example via an interrupt (IDT hooked)

"You have too give the full label name:"
ok, thank you revolution, I understand now.


_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 30 Jul 2010, 09:59
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.

Powered by rwasa.