LEA
Load the address (not the value) of a LabelLD R1, Label1 ; Load the value stored in Label1 address to R1
For example
LD R1, Label1
=
=
LEA R2, Label1 ;store Label1's address to R2
LDR R1, R2, #0 ; Load Label1's value
ST and STR is similar to LD, and LDR
JSR is use to call function
Need to save and restore R7 to a label, then RET can work.
BRnzp ; Branch if last accessed register is negative, zero or positive (uncondition)
BRz ; Branch if last accessed register is zero.
BRzp ; Branch if last accessed register is zero or positive
for example
BRp Label2
.FILL
Assign a address to Label, reverse the address to this label, and initial the value
NINE .FILL #57
Allocate a memory address to NINE, and fill that address with the value 57
ZERO. FILL x0000
NAME .STRINGZ "hello"
Allocate a address to NAME, and fill the memory with h e l l o , chars.
NAME .STRINGZ "hello"
Allocate a address to NAME, and fill the memory with h e l l o , chars.
ARR .BLKW 20 ; assign a address to ARR, and reserve the following 20 address for it.
--
Feng