Program 27: Subtraction of Two 32-bit Numbers
LPC2148 · Assembly

AREA      SUB32, CODE, READONLY
             ENTRY

   START
             LDR       R0, =0x55555555             ; first 32-bit number (minuend)
             LDR       R1, =0x22222222             ; second 32-bit number (subtrahend)
             SUBS      R2, R0, R1                  ; R2 = R0 - R1, update flags

   STOP      B         STOP                        ; stay here (end of program)

             END
