亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? start12.c

?? MC9s12d系列單片機中斷程序實例
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*****************************************************
      start12.c - standard startup code
   The startup code may be optimized to special user requests
 ----------------------------------------------------
   Copyright (c) Metrowerks, Basel, Switzerland
               All rights reserved

Note: ROM libraries are not implemented in this startup code
Note: C++ destructors of global objects are NOT yet supported in the HIWARE Object File Format.
      To use this feature, please build your application with the ELF object file format.
 *****************************************************/
/*lint -esym(750, __NO_FLAGS_OFFSET, __NO_MAIN_OFFSET, __NO_STACKOFFSET_OFFSET) */
/* these macros remove some unused fields in the startup descriptor */
#define __NO_FLAGS_OFFSET       /* we do not need the flags field in the startup data descriptor */
#define __NO_MAIN_OFFSET        /* we do not need the main field in the startup data descriptor */
#define __NO_STACKOFFSET_OFFSET /* we do not need the stackOffset field in the startup data descriptor */

/*#define __BANKED_COPY_DOWN : allow to allocate .copy in flash area */
#if defined(__BANKED_COPY_DOWN) && (!defined(__HCS12X__) || !defined(__ELF_OBJECT_FILE_FORMAT__))
#error /* the __BANKED_COPY_DOWN switch is only supported for the HCS12X with ELF */
       /* (and not for the HC12, HCS12 or for the HIWARE object file format) */
#endif

#include "hidef.h"
#include "start12.h"

/***************************************************************************/
/* Macros to control how the startup code handles the COP:                 */
/* #define _DO_FEED_COP_  : do feed the COP                                */
/* #define _DO_ENABLE_COP_: do enable the COP                              */
/* #define _DO_DISABLE_COP_: disable the COP                               */
/* Without defining any of these, the startup code does NOT handle the COP */
/***************************************************************************/
/* __ONLY_INIT_SP define:                                                  */
/* This define selects an shorter version of the startup code              */
/* which only loads the stack pointer and directly afterwards calls        */
/* main. This version does however NOT initialized global variables        */
/* (So this version is not ANSI compliant!)                                */
/***************************************************************************/
/* __FAR_DATA define:                                                      */
/* By default, the startup code only supports to initialize the default    */
/* kind of memory. If some memory is allocated far in the small or banked  */
/* memory model, then the startup code only supports to initialize this    */
/* memory blocks if __FAR_DATA is defined. If __FAR_DATA is not defined,   */
/* then the linker will issue a message like                               */
/* "L1128: Cutting value _Range beg data member from 0xF01000 to 0x1000"   */
/* and this startup code writes to the cutted address                      */
/***************************************************************************/
/* __BANKED_COPY_DOWN define:                                              */
/* by default, the startup code assumes that the startup data structure    */
/* _startupData, the zero out areas and the .copy section are all 				 */
/* allocated in NON_BANKED memory. Especially the .copy section can be     */
/* if there are many or large RAM areas to initialize.                     */  
/* for the HCS12X, which also copies the XGATE RAM located code via .copy  */
/* section, the startup code supports to allocate .copy in a banked flash  */
/* The placement of .copy in the prm file has to be adapted when adding or */
/* removing the this macro.                                                */
/* Note: This macro is only supported for the HCS12X and when using ELF    */
/***************************************************************************/

#ifdef __cplusplus
#define __EXTERN_C  extern "C"
#else
#define __EXTERN_C
#endif

__EXTERN_C void main(void); /* prototype of main function */

#ifndef __ONLY_INIT_SP
#pragma DATA_SEG __NEAR_SEG STARTUP_DATA /* _startupData can be accessed using 16 bit accesses. */
/* This is needed because it contains the stack top, and without stack, far data cannot be accessed */
/*lint -e1065 */
struct _tagStartup _startupData;  /*   read-only: */
                                  /*   _startupData is allocated in ROM and */
                                  /*   initialized by the linker */
/*lint +e1065 */
#pragma DATA_SEG DEFAULT
#endif /* __ONLY_INIT_SP */

#if defined(FAR_DATA) && (!defined(__HCS12X__) || defined(__BANKED_COPY_DOWN))
#include "non_bank.sgm"
/* the init function must be in non banked memory if banked variables are used */
/* because _SET_PAGE is called, which may change any page register. */

__EXTERN_C void _SET_PAGE(void);  /* the inline assembler needs a prototype */
                                  /* this is a runtime routine with a special */
                                  /* calling convention, do not use it in c code! */
#else
#include "default.sgm"
#endif /* defined(FAR_DATA) && (!defined(__HCS12X__) || defined(__BANKED_COPY_DOWN)) */


/* define value and bits for Windef Register */
#ifdef HC812A4
#define WINDEF (*(volatile unsigned char*) 0x37)
#if defined( __BANKED__) || defined(__LARGE__) || defined(__PPAGE__)
#define __ENABLE_PPAGE__ 0x40
#else
#define __ENABLE_PPAGE__ 0x0
#endif
#if defined(__DPAGE__)
#define __ENABLE_DPAGE__ 0x80
#else
#define __ENABLE_DPAGE__ 0x0
#endif
#if defined(__EPAGE__)
#define __ENABLE_EPAGE__ 0x20
#else
#define __ENABLE_EPAGE__ 0x0
#endif
#endif  /* HC812A4 */

#ifdef _HCS12_SERIALMON
      /* for Monitor based software remap the RAM & EEPROM to adhere
         to EB386. Edit RAM and EEPROM sections in PRM file to match these. */
#define ___INITRM      (*(volatile unsigned char *) 0x0010)
#define ___INITRG      (*(volatile unsigned char *) 0x0011)
#define ___INITEE      (*(volatile unsigned char *) 0x0012)
#endif

#if defined(_DO_FEED_COP_)
#define __FEED_COP_IN_HLI()  } __asm movb #0x55, _COP_RST_ADR; __asm movb #0xAA, _COP_RST_ADR; __asm {
#else
#define __FEED_COP_IN_HLI() /* do nothing */
#endif

#ifndef __ONLY_INIT_SP
#if (!defined(FAR_DATA) || defined(__HCS12X__)) && (defined( __BANKED__) || defined(__LARGE__) || defined(__BANKED_COPY_DOWN))
static void __far Init(void)
#else
static void Init(void)
#endif
 {
/* purpose:     1) zero out RAM-areas where data is allocated   */
/*              2) copy initialization data from ROM to RAM     */
/*              3) call global constructors in C++              */
/*   called from: _Startup, LibInits                            */
   __asm {
ZeroOut:
#if defined(__HIWARE_OBJECT_FILE_FORMAT__) && defined(__LARGE__)
             LDX   _startupData.pZeroOut:1  ; in the large memory model in the HIWARE format, pZeroOut is a 24 bit pointer
#else
             LDX   _startupData.pZeroOut    ; *pZeroOut
#endif
             LDY   _startupData.nofZeroOuts ; nofZeroOuts
             BEQ   CopyDown                 ; if nothing to zero out

NextZeroOut: PSHY                           ; save nofZeroOuts
#if defined(FAR_DATA)
             LDAB  1,X+                     ; load page of destination address
             LDY   2,X+                     ; load offset of destination address
#if defined(__HCS12X__)
             STAB  __GPAGE_ADR__
#else /* defined(__HCS12X__) */
             __PIC_JSR(_SET_PAGE)           ; sets the page in the correct page register
#endif /* defined(__HCS12X__) */
#else   /* FAR_DATA */
             LDY   2,X+                     ; start address and advance *pZeroOut (X = X+4)
#endif  /* FAR_DATA */

#if defined(__HCS12X__) && defined(FAR_DATA)
             PSHX
             LDX   0,X                      ; byte count
#if defined(__OPTIMIZE_FOR_SIZE__)
             CLRA
NextWord:    GSTAA 1,Y+                     ; clear memory byte
             __FEED_COP_IN_HLI()            ; feed the COP if necessary /*lint !e505 !e522 asm code */
             DBNE  X, NextWord              ; dec byte count
#else
             LDD #0
             LSRX
             BEQ   LoopClrW1                ; do we copy more than 1 byte?
NextWord:    GSTD 2,Y+                      ; clear memory word
             __FEED_COP_IN_HLI()            ; feed the COP if necessary /*lint !e505 !e522 asm code */
             DBNE  X, NextWord              ; dec word count
LoopClrW1:
             BCC   LastClr                  ; handle last byte
             GSTAA 1,Y+											; handle last byte
LastClr:
#endif
             PULX
             LEAX  2,X
#elif defined(__OPTIMIZE_FOR_SIZE__)               /* -os, default */
             LDD   2,X+                     ; byte count
NextWord:    CLR   1,Y+                     ; clear memory byte
             __FEED_COP_IN_HLI()            ; feed the COP if necessary /*lint !e505 !e522 asm code */
             DBNE  D, NextWord              ; dec byte count
#else /* __OPTIMIZE_FOR_TIME__ */
             LDD   2,X+                     ; byte count
             LSRD                           ; /2 and save bit 0 in the carry
             BEQ   LoopClrW1                ; do we copy more than 1 byte?
             PSHX
             LDX   #0
LoopClrW:    STX   2,Y+                     ; Word-Clear
             __FEED_COP_IN_HLI()            ; feed the COP if necessary /*lint !e505 !e522 asm code */
             DBNE  D, LoopClrW
             PULX
LoopClrW1:
             BCC   LastClr                  ; handle last byte
             CLR   1,Y+
LastClr:
#endif /* __OPTIMIZE_FOR_SIZE__/__OPTIMIZE_FOR_TIME__ */
             PULY                           ; restore nofZeroOuts
             DEY                            ; dec nofZeroOuts
             BNE  NextZeroOut
CopyDown:
#if defined(__BANKED_COPY_DOWN)
             LDAA  _startupData.toCopyDownBeg:0 ; get PAGE address of .copy section
             STAA	 __PPAGE_ADR__          ; set PPAGE address
             LDX   _startupData.toCopyDownBeg:1 ; load address of copy down desc.
#elif defined(__ELF_OBJECT_FILE_FORMAT__)
             LDX   _startupData.toCopyDownBeg ; load address of copy down desc.
#else
             LDX   _startupData.toCopyDownBeg:2 ; load address of copy down desc.
#endif
NextBlock:
             LDD   2,X+                     ; size of init-data -> D
             BEQ   funcInits                ; end of copy down desc.
#ifdef FAR_DATA
             PSHD                           ; save counter
             LDAB  1,X+                     ; load destination page
             LDY   2,X+                     ; destination address
#if defined(__HCS12X__)
             STAB  __GPAGE_ADR__
#else  /* __HCS12X__ */
             __PIC_JSR(_SET_PAGE)           ; sets the destinations page register
#endif /* __HCS12X__ */
             PULD                           ; restore counter
#else  /* FAR_DATA */
             LDY   2,X+                     ; load destination address
#endif /* FAR_DATA */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品理论片在线观看| 91在线视频免费观看| 亚洲制服丝袜一区| 亚洲免费视频成人| 一区二区三区在线免费| 亚洲伦理在线免费看| 自拍偷拍亚洲激情| 一区二区三区日韩欧美精品| 精品精品欲导航| 日本一二三不卡| 亚洲色图视频网| 伊人婷婷欧美激情| 日韩影院精彩在线| 国产精品自产自拍| 成人精品视频一区| 91国产丝袜在线播放| 91精品婷婷国产综合久久竹菊| 欧美大片在线观看| 国产精品久久网站| 五月天欧美精品| 国产麻豆一精品一av一免费 | 久久精品国产**网站演员| 久久av资源站| 91浏览器在线视频| 欧美精品一级二级| 久久婷婷成人综合色| 尤物av一区二区| 精品中文字幕一区二区小辣椒| 国产成人鲁色资源国产91色综| 色网站国产精品| 日韩精品中文字幕一区二区三区| 国产视频在线观看一区二区三区 | 亚洲黄色免费网站| 久久99在线观看| 在线影视一区二区三区| 精品国产免费人成电影在线观看四季 | 国产黄人亚洲片| 欧美日韩精品高清| 久久精品亚洲麻豆av一区二区| 亚洲精品乱码久久久久| 狠狠狠色丁香婷婷综合激情| 91丨porny丨在线| 久久久久国产精品厨房| 视频一区免费在线观看| 一本大道综合伊人精品热热| 久久综合国产精品| 日日夜夜精品视频免费 | 艳妇臀荡乳欲伦亚洲一区| 国产成人在线色| 日韩一级二级三级| 亚洲国产精品麻豆| 99久久国产综合精品色伊| 久久久不卡影院| 日本不卡视频在线| 欧美日韩在线不卡| 亚洲色图欧美激情| 国产老妇另类xxxxx| 日韩欧美视频在线| 婷婷久久综合九色综合绿巨人| 色婷婷综合激情| 国产精品久久久久永久免费观看| 国产美女视频一区| 日韩精品自拍偷拍| 美腿丝袜亚洲三区| 日韩欧美国产电影| 欧美bbbbb| 日韩视频国产视频| 青娱乐精品在线视频| 欧美一区二区在线播放| 亚洲成人精品一区| 欧美日韩精品一区二区在线播放| 亚洲国产一区二区三区 | 国产1区2区3区精品美女| 精品久久久久久无| 狠狠色伊人亚洲综合成人| 欧美电影精品一区二区| 蜜桃av一区二区在线观看| 日韩欧美区一区二| 国产精一品亚洲二区在线视频| 久久综合色8888| 成人免费毛片aaaaa**| 国产精品久久免费看| 一本高清dvd不卡在线观看 | 激情偷乱视频一区二区三区| 精品国产亚洲在线| 国产精品自拍毛片| 中文字幕日韩av资源站| 欧美色偷偷大香| 午夜精品久久久久久久99水蜜桃 | 成人高清视频在线观看| 亚洲图片另类小说| 欧美日韩一本到| 另类小说一区二区三区| 欧美激情一区三区| 欧美私人免费视频| 久久9热精品视频| 亚洲欧洲国产日韩| 欧美日韩亚州综合| 国产一区二区三区电影在线观看| 国产精品色在线| 欧美另类z0zxhd电影| 国产乱码精品一区二区三 | 看片的网站亚洲| 欧美激情一区不卡| 91高清视频在线| 蜜桃一区二区三区在线观看| 国产精品乱码人人做人人爱 | 久久综合久久99| 色综合天天综合| 裸体歌舞表演一区二区| 亚洲欧洲性图库| 精品少妇一区二区三区免费观看 | 国产色产综合产在线视频| 色综合久久88色综合天天免费| 免费国产亚洲视频| 国产精品久久久久久久久免费丝袜| 欧洲人成人精品| 成人午夜精品一区二区三区| 日日嗨av一区二区三区四区| 国产精品国产三级国产有无不卡| 在线播放91灌醉迷j高跟美女| 粉嫩高潮美女一区二区三区| 日韩精品免费视频人成| 亚洲日本在线a| 久久久精品中文字幕麻豆发布| 欧美日韩电影一区| 99久久久久久| 国产精品中文欧美| 免费人成精品欧美精品| 亚洲电影一区二区| 亚洲欧美国产三级| 国产精品久久一卡二卡| 久久久久久夜精品精品免费| 欧美精品一二三| 欧美无乱码久久久免费午夜一区| 国产精品2024| 国产一区二区伦理| 久久精品国产精品亚洲精品| 五月婷婷激情综合网| 亚洲专区一二三| 亚洲品质自拍视频| 久久久三级国产网站| 5566中文字幕一区二区电影| 色欧美片视频在线观看| 色猫猫国产区一区二在线视频| 国产**成人网毛片九色| 国产在线观看免费一区| 韩国av一区二区三区| 久久99精品国产麻豆婷婷| 久久99国产精品免费网站| 久久精品国产第一区二区三区| 人人精品人人爱| 中文字幕在线不卡一区二区三区| 6080日韩午夜伦伦午夜伦| 一区二区三区日韩精品视频| 精一区二区三区| 欧美午夜宅男影院| 国产亚洲精品7777| 亚洲成人免费影院| 成人高清伦理免费影院在线观看| 亚洲欧美日韩人成在线播放| 色婷婷久久久亚洲一区二区三区| 国产精品69毛片高清亚洲| 久久精品国产**网站演员| 精品制服美女久久| 国产精品自拍av| 波多野结衣亚洲一区| 在线精品国精品国产尤物884a| 在线免费不卡视频| 日韩一区二区三区电影| 久久亚洲私人国产精品va媚药| 中文字幕av不卡| 一区二区三区欧美视频| 日本伊人精品一区二区三区观看方式 | 91麻豆国产香蕉久久精品| 91福利区一区二区三区| 日韩视频免费直播| 国产精品乱码一区二三区小蝌蚪| 亚洲一区二区三区视频在线播放| 午夜精品123| 国产传媒欧美日韩成人| 在线看日本不卡| 欧美精品一区二区三| 亚洲日本va午夜在线电影| 丝袜a∨在线一区二区三区不卡| 韩国av一区二区三区| 在线观看日韩精品| 亚洲精品一区二区三区蜜桃下载 | 激情伊人五月天久久综合| 99麻豆久久久国产精品免费优播| 欧美日韩免费高清一区色橹橹| 精品国产免费久久| 亚洲午夜久久久久中文字幕久| 精品一二三四区| 欧洲国内综合视频| 国产精品网站在线| 免费看日韩精品| 在线观看免费视频综合| 欧美激情一区二区三区蜜桃视频| 日韩国产高清在线|