📄 cexit.s43
字号:
/**************************************************
*
* System termination code for the MSP430 IAR Systems C/EC++ Compiler.
*
* Copyright 2002-2003 IAR Systems. All rights reserved.
*
* $Revision: 1.1 $
*
**************************************************/
#include "macros.m43"
#include "cfi.m43"
#define XRSEGCSTART RSEG CSTART:CODE:NOROOT(1)
XCFI_NAMES libNames
XCFI_COMMON libCommon, libNames
// ---------------------------------------------------------
// The exit system
//
// The default exit function, written in C, calls _exit provided
// below. This function performs system cleanup and calls __exit that
// halts the system.
//
// -----------------------------------------------
// _exit -- Perform system cleanup and jump to __exit.
//
// The module below contains a number of segment parts that is
// included in the final application only if they are needed.
//
MODULE ?_exit
XRSEGCSTART
PUBLIC _exit
_exit:
EXTERN __exit
REQUIRE __exit
REQUIRE ?exit_br_xxexit
// -------------------------------------
// Segment part included if the argument to exit must be saved and
// later restored.
XRSEGCSTART
REQUIRE ?exit_restore
?exit_save:
PUSH.W R12
// -------------------------------------
// Segment part included if destructors must be called.
XRSEGCSTART
PUBLIC __cstart_call_dtors
EXTERN __call_dtors
REQUIRE ?exit_save
// This label is required by "__record_needed_destruction".
__cstart_call_dtors:
XCALL #__call_dtors
// -------------------------------------
// Segment part included if DLib standard IO is used.
XRSEGCSTART
PUBLIC __cstart_closeall
REQUIRE ?exit_save
// This label is required by DLib.
__cstart_closeall:
EXTERN _Close_all
XCALL #_Close_all
// -------------------------------------
// Restore the argument previously stored by the "save" section above.
XRSEGCSTART
?exit_restore:
POP.W R12
XRSEGCSTART
?exit_br_xxexit:
// Jump to exit.
XBR #__exit
ENDMOD
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -