Ik ben al een tijdje met PIC's aan het stoeien, en kom hierbij regelmatig het commando ERRORLEVEL tegen.
Waarvoor dient dit precies ?
errorlevel {0|1|2|+msgnum|-msgnum} [, ...]
Sets the types of messages that are printed in the listing file and error file.
Setting Affect
0 Messages, warnings, and errors printed
1 Warnings and errors printed
2 Errors printed
-msgnum Inhibits printing of message msgnum
+msgnum Enables printing of message msgnum
Usage
This directive is used in the following types of code: absolute or relocatable.
For information on types of code, see Assembler Operation.
Errors cannot be disabled. Warnings may be disabled using setting 2.
Messages may be disabled using settings 1 or 2.
Also, messages may be disabled individually.
However, the setting of 0, 1, or 2 overrides individual message disabling or enabling.
Be careful about disabling warnings and messages,
as this can make debugging of your code more difficult.
The most common usage for this directive is to suppress "MESSAGE 302 - Operand Not in bank 0,
check to ensure bank bits are correct".
See the Simple Example for how to do this.
Simple Example
errorlevel -302 ; Turn off banking message
; known tested (good) code
:
errorlevel +302 ; Enable banking message
; untested code
:
endOf gebruik gewoon de "Help" van MPASM Assembler waar je dit mooi geformatteerd krijgt met meer voorbeelden erbij.