Arm VERSION 1.2 Instrukcja Użytkownika Strona 213

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 360
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 212
Thumb Instruction Reference
ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-19
5.2.3 ADD and SUB, sp
Increment or decrement sp by an immediate constant.
Syntax
ADD sp, #expr
SUB sp, #expr
where:
expr
is an expression that evaluates (at assembly time) to a multiple of 4 in the
range 508 to +508.
Usage
This instruction adds the value of
expr
to the value from
Rp
, and places the result in
Rd
.
Note
An
ADD
instruction with a negative value for
expr
assembles to the corresponding
SUB
instruction with a positive constant. A
SUB
instruction with a negative value for
expr
assembles to the corresponding
ADD
instruction with a positive constant.
Be aware of this when looking at disassembly listings.
Condition flags
This instruction does not affect the flags.
Architectures
This instruction is available in all T variants of the ARM architecture.
Examples
ADD sp,#312
SUB sp,#96
SUB sp,#abc+8 ; abc + 8 must evaluate at assembly time to
; a multiple of 4 in the range –508 to +508
Przeglądanie stron 212
1 2 ... 208 209 210 211 212 213 214 215 216 217 218 ... 359 360

Komentarze do niniejszej Instrukcji

Brak uwag