Operation

Assembler

Action

S flags

Copy and shift

MOV{cond}{S} Rd, <Oprnd>

d:= <Oprnd>

NZCR

Not

MVN{cond}{S} Rd, <Oprnd>

d:= ~<Oprnd>

NZCR

Add

ADD{cond}{S} Rd, Rn, <Oprnd>

d:= Rn + <Oprnd>

NZCVR

Add with carry

ADC{cond}{S} Rd, Rn, <Oprnd>

d:= Rn + <Oprnd> + Carry

NZCVR

Sub

SUB{cond}{S} Rd, Rn, <Oprnd>

d:= Rn <Oprnd>

NZCVR

Sub with carry

SBC{cond}{S} Rd, Rn, <Oprnd>

d:= Rn <Oprnd> Not(Carry)

NZCVR

Reverse Sub

RSB{cond}{S} Rd, Rn, <Oprnd>

d:= <Oprnd> Rn

NZCVR

Rev sub with carry

RSC{cond}{S} Rd, Rn, <Oprnd>

d:= <Oprnd> Rn – Not(Carry)

NZCVR

Multiply

MUL{cond}{S} Rd, Rm, Rs

d:= Rm * Rs

NZR

Multiply Add

MLA{cond}{S} Rd, Rm, Rs, Rn

d:= (Rm * Rs) + Rn

NZR

Compare

CMP{cond} Rd, <Oprnd>

flags:= Rn <Oprnd>

NZCV

Cmp Negative

CMN{cond} Rd, <Oprnd>

flags:= Rn + <Oprnd>

NZCV

Test

TST{cond} Rn, <Oprnd>

flags:= Rn And <Oprnd>

NZC

Test equivalence

TEQ{cond} Rn, <Oprnd>

flags:= Rn Xor <Oprnd>

NZC

And

AND{cond}{S} Rd, Rn, <Oprnd>

Rd:= Rn And <Oprnd>

NZC

Xor

EOR{cond}{S} Rd, Rn, <Oprnd>

Rd:= Rn Xor <Oprnd>

NZC

 

XOR{cond}{S} Rd, Rn, <Oprnd>

Rd:= Rn Xor <Oprnd>

NZC

Or

ORR{cond}{S} Rd, Rn, <Oprnd>

Rd:= Rn Or <Oprnd>

NZC

BitClear (~And)

BIC{cond}{S} Rd, Rn, <Oprnd>

Rd:= Rn And Not <Oprnd>

NZC

Branch

B{cond} label

R15/PC:= address

 

Gosub

BL{cond} label

R14:=R15/PC, R15/PC:= address

 

Load Int

LDR{cond} Rd, <a_mode>

Rd:= [address]

 

 

LDR{cond} Rd, Label

Rd:= data at label. The label address is calculated

 

 

relative to the PC. This does not work with

 

 

constants

 

Load Byte

LDR{cond}B Rd, <a_mode>

Rd:= [byte at address] 0 extended

 

 

LDRB{cond} Rd, Label

Rd:= data at label. The label address is calculated

 

 

relative to the PC. This does not work with

 

 

constants

 

Multiple load

 

Stack operations (Pop)

 

Inc Before

LDM{cond}IB Rd{!}, {reg list}

! sets the W bit (updates the base

 

Inc After

LDM{cond}IA Rd{!}, {reg list}

register after the transfer)

 

Dec Before

LDM{cond}DB Rd{!}, {reg list}

 

 

Dec After

LDM{cond}DA Rd{!}, {reg list}

 

 

Store Int

STR{cond} Rd, <a_mode>

[address]:= Rd

 

 

STR{cond} Rd, Label

data at label:= Rd. The label address is calculated

 

 

relative to the PC. This does not work with

 

 

constants

 

Store Byte

STRB{cond} Rd, <a_mode>

[address]:= byte value from Rd

 

 

STRB{cond} Rd, Label

data at label:= Rd. The label address is calculated

 

 

relative to the PC. This does not work with

 

 

constants

 

Multiple Store

 

Stack operations (Push)

 

Inc Before

STM{cond}IB Rd{!}, {reg list}

! sets the W bit (updates the base

 

Inc After

STM{cond}IA Rd{!}, {reg list}

register after the transfer)

 

Dec Before

STM{cond}DB Rd{!}, {reg list}

 

 

Dec After

STM{cond}DA Rd{!}, {reg list}

 

 

Multiplication

MUL rd, r1 r2

rd=r1*r2

 

 

MLA rd, r1, r2, r3

rd=r1*r2+r3

 

 

SMULL rd1, rd2, r1, r2

Signed mul rd1=low r1*r2, rd2=high r1*r2

 

SMLAL rd1, rd2, r1, r2

Signed mul add rd1+=low r1*r2, rd2+=high r1*r2

 

UMULL rd1, rd2, r1, r2

rd1=low r1*r2, rd2=high r1*r2

 

 

UMLAL rd1, rd2, r1, r2

mul add rd1+=low r1*r2, rd2+=high r1*r2

*labelName

 

Creates a label

 

$

 

See $ in ASM mode

 

“, ¢

 

See ASM mode

 

632 The Development Library

Page 530
Image 530
HP 50g Graphing, 48gII Graphing manual Operation Assembler Action Flags