Arm VERSION 1.2 Manuel d'utilisateur Page 314

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 360
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 313
Directives Reference
7-32 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B
7.4.5 WHILE and WEND
The
WHILE
directive starts a sequence of instructions or directives that are to be
assembled repeatedly. The sequence is terminated with a
WEND
directive.
Syntax
WHILE logical-expression
code
WEND
where:
logical-expression
is an expression that can evaluate to either
{TRUE}
or
{FALSE}
(see Logical
expressions on page 3-23).
Usage
Use the
WHILE
directive, together with the
WEND
directive, to assemble a sequence of
instructions a number of times. The number of repetitions can be zero.
You can use
IF...ENDIF
conditions within
WHILE...WEND
loops.
WHILE...WEND
loops can be nested (see Nesting directives on page 7-26).
Example
count SETA 1 ; you are not restricted to
WHILE count <= 4 ; such simple conditions
count SETA count+1 ; In this case,
; code ; this code will be
; code ; repeated four times
WEND
Vue de la page 313
1 2 ... 309 310 311 312 313 314 315 316 317 318 319 ... 359 360

Commentaires sur ces manuels

Pas de commentaire