flat assembler
Message board for the users of flat assembler.

Index > Main > local lables

Author
Thread Post new topic Reply to topic
rob.rice



Joined: 20 Dec 2003
Posts: 54
rob.rice 01 Apr 2005, 06:57
the DOCs aren't quite clear on
how to use local lables do I
jmp .local_lable
of do I
jmp local_lable
I can't find an example to go by
Post 01 Apr 2005, 06:57
View user's profile Send private message Reply with quote
Matrix



Joined: 04 Sep 2004
Posts: 1166
Location: Overflow
Matrix 01 Apr 2005, 07:40
Helo,

local labels are assigned to the nearest global labels/procedures
Code:
proc1:
jmp .label666 ; this jumps to next line (proc1.label666)
.label666:
mov ax,3
;jump a local label above or below(inside a local block between 2 global labels)
jmp .label666 ; this jumps to proc1.label666
ret
proc2:
.label666:
mov ax,2
jmp .label666 ; this jumps to proc2.label666
ret
proc3:
.label666:
mov ax,1
ret

;now, if you want to jump on a local label from outside a block
jmp proc3.labl666 ; jumps local .label666 after global proc3 label
jmp proc1.labl666 ; jumps local .label666 after global proc1 label

    
Post 01 Apr 2005, 07:40
View user's profile Send private message Visit poster's website Reply with quote
rob.rice



Joined: 20 Dec 2003
Posts: 54
rob.rice 02 Apr 2005, 03:05
thank you this is what I wanted to know
Post 02 Apr 2005, 03:05
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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.