A couple of questions:
1) Am I correct in thinking the size of a label in the source doesn't matter?
e.g.
I_AM_A_VERY_VERY_LONG_LABEL:
and
JH:
will compile to the same size code?
2) How does @@: and jmp @A work?
Best regards,
Astro.
dunno 'bout "@A" - i think that is just a branch label
but
@@: is an anonymous branch label
it may be referenced by @B or (backward) @F (forward)
jz @F branches to the next (forward) anonymous label
jmp @B branches to the most recent (backward) anonymous label
the names can be any length up to 247 bytes
i sometimes make them long to write the code, then clean them up a little
Ahh! That makes sense. I wondered how they were referenced.
@A was just an arbitrary letter I chose - likely isn't valid then.
Thanks! :thumbu
Best regards,
Astro.
Astro,
A label is just a notation for a location in code, in the final code there are no lables, just addresses that are targets for jumps and / or calls.
Hi,
Quotein the final code there are no lables, just addresses that are targets for jumps and / or calls.
That's what I thought it did, but it was based upon another architecture, and wasn't sure if the label made it into the final binary verbatim (it appeared that it wasn't the case, but wanted to check).
I was busy cleaning up some code I'd written and it prompted the question.
Best regards,
Astro.
Hi,
The easiest way to see this is with a program listing.
13 0013 B9 0008 MOV CX,8
14 0016 @@:
15 0016 90 NOP
16 0017 E2 FD LOOP @@
17
18 0019 B9 0008 MOV CX,8
19 001C Honking_Big_Label:
20 001C 90 NOP
21 001D E2 FD LOOP Honking_Big_Label
And noting that the generated code is the same.
Steve N.