Difference between revisions of "Auto Assembler:label"

From Cheat Engine
Jump to navigation Jump to search
(Created page with ''''Auto Assembler''' label(''LabelName'') Enables the word 'LabelName' to be used as a symbol. Note: The label address must be set to be used. Tip: Use [[Auto Assembler:regist…')
 
(See also)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
[[Category:Assembler]]
 
'''Auto Assembler''' label(''LabelName'')
 
'''Auto Assembler''' label(''LabelName'')
  
Line 7: Line 8:
 
Tip: Use [[Auto Assembler:registerSymbol|registerSymbol]] to use the label in other AA scripts.
 
Tip: Use [[Auto Assembler:registerSymbol|registerSymbol]] to use the label in other AA scripts.
  
=== Function Parameters ===
+
=== Command Parameters ===
 
{|width="85%" cellpadding="10%" cellpadding="5%" cellspacing="0" border="0"
 
{|width="85%" cellpadding="10%" cellpadding="5%" cellspacing="0" border="0"
 
!align="left"|Parameter
 
!align="left"|Parameter
Line 26: Line 27:
 
     ...
 
     ...
  
 +
label(mylabel)
 +
 +
00451029:
 +
jmp 00410000
 +
nop
 +
nop
 +
nop
 +
mylabel:
 +
 +
00410000:
 +
mov [00580120],esi
 +
mov [esi+80],ebx
 +
xor eax,eax
 +
jmp mylabel
 +
 +
 +
== Notes ==
 +
By default, CE doesn't care if you label() your labels or not. It's perfectly fine to do:[http://forum.cheatengine.org/viewtopic.php?t=594776]
 +
 +
Code:
 +
00400500:
 +
jmp bla
 +
something:
 +
jmp 00400600
 +
bla:
 +
jmp something
 +
But, for those that don't like that, they can use the [[Auto_Assembler:Strict|{$STRICT}]] line in their script.
 +
 +
When this line is present in your script, ce will not assume that an undefined symbol is a label, and just give you an error instead.
  
 
== See also ==
 
== See also ==
 
* [[Cheat_Engine:Auto Assembler|Auto Assembler]]
 
* [[Cheat_Engine:Auto Assembler|Auto Assembler]]
 +
* [[Auto_Assembler:Commands|Auto Assembler Commands]]
  
=== Related Functions ===
+
=== Related Commands ===
 
* [[Auto Assembler:aobScan|aobScan]]
 
* [[Auto Assembler:aobScan|aobScan]]
 
* [[Auto Assembler:aobScanModule|aobScanModule]]
 
* [[Auto Assembler:aobScanModule|aobScanModule]]
Line 45: Line 76:
 
* [[Auto Assembler:registerSymbol|registerSymbol]]
 
* [[Auto Assembler:registerSymbol|registerSymbol]]
 
* [[Auto Assembler:unregisterSymbol|unregisterSymbol]]
 
* [[Auto Assembler:unregisterSymbol|unregisterSymbol]]
* [[Auto Assembler:LUA|LUA]]
+
* [[Auto Assembler:LUA ASM|LUA ASM]]
* [[Auto Assembler:ASM|ASM]]
 

Latest revision as of 00:28, 13 January 2018

Auto Assembler label(LabelName)

Enables the word 'LabelName' to be used as a symbol.

Note: The label address must be set to be used.

Tip: Use registerSymbol to use the label in other AA scripts.

Command Parameters[edit]

Parameter Type Description
LabelName string The label name


Examples[edit]

label(someLabel)
...
00123ABC:
  someLabel:
    ...
label(mylabel)

00451029:
jmp 00410000
nop
nop
nop
mylabel:

00410000:
mov [00580120],esi
mov [esi+80],ebx
xor eax,eax
jmp mylabel


Notes[edit]

By default, CE doesn't care if you label() your labels or not. It's perfectly fine to do:[1]

Code:

00400500:
jmp bla
something:
jmp 00400600
bla:
jmp something

But, for those that don't like that, they can use the {$STRICT} line in their script.

When this line is present in your script, ce will not assume that an undefined symbol is a label, and just give you an error instead.

See also[edit]

Related Commands[edit]