END/de

(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
(Beispiel)
(See also)
Zeile 43: Zeile 43:
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
= <span class="f_Header">See also</span> =
+
= <span class="f_Header">Siehe auch</span> =
  
 
[[STOP]]
 
[[STOP]]

Version vom 18. Februar 2013, 22:54 Uhr

Inhaltsverzeichnis

Funktion

Beendet die Programmausführung.

 

 

Syntax

END

 

 

Remarks

STOP can also be used to terminate a program.

 

 

When an END statement is encountered, all interrupts are disabled and a never-ending loop is generated.

When a STOP is encountered the interrupts will not be disabled. Only a never ending loop will be created.

 

In an embedded application you probably do not want to end the application. But there are cases where you do want to end the application. For example when you control some motors, and you determine a failure, you do not want to use a Watchdog reset because then the failure will occur again. In that case you want to display an error, and wait for service personal to fix the failure.

 

It is important to notice that without the END statement, your program can behave strange in certain cases. For example :

Print "Hello"

 

Note that there is no END statement. So what will happen? The program will print "Hello". But as the compiler places the library code behind the program code, the micro will execute the library code ! But without being called. As most library code are assembler sub routines that end with a RET, your program will most likely crash, or reset and repeat for ever.

 

Siehe auch

STOP

 

 

Beispiel


Print "Hallo" 'serielle Ausgabe 
End 'Programmausführung beenden und alle Interrupts disablen

Languages   English Deutsch  
Meine Werkzeuge
Namensräume
Varianten
Aktionen
Navigation
In anderen Sprachen
Sprache