Arm VERSION 1.2 Manual do Utilizador Página 311

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 360
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 310
Directives Reference
ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-29
Using a macro to produce assembly-time diagnostics:
MACRO ; Macro definition
diagnose $param1="default" ; This macro produces
INFO 0,"$param1" ; assembly-time diagnostics
MEND ; (on second assembly pass)
; macro expansion
diagnose ; Prints blank line at assembly-time
diagnose "hello" ; Prints "hello" at assembly-time
diagnose | ; Prints "default" at assembly-time
7.4.3 MEXIT
The
MEXIT
directive is used to exit a macro definition before the end.
Usage
Use
MEXIT
when you need an exit from within the body of a macro. Any unclosed
WHILE...WEND
loops or
IF...ENDIF
conditions within the body of the macro are closed by
the assembler before the macro is exited.
See also MACRO and MEND on page 7-27.
Example
MACRO
$abc macro abc $param1,$param2
; code
WHILE condition1
; code
IF condition2
; code
MEXIT
ELSE
; code
ENDIF
WEND
; code
MEND
Vista de página 310
1 2 ... 306 307 308 309 310 311 312 313 314 315 316 ... 359 360

Comentários a estes Manuais

Sem comentários