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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? datapage.c

?? 第二屆飛思卡爾杯智能車大賽
?? C
?? 第 1 頁 / 共 5 頁
字號:
/******************************************************************************
  FILE        : datapage.c
  PURPOSE     : paged data access runtime routines
  MACHINE     : Freescale 68HC12 (Target)
  LANGUAGE    : ANSI-C
  HISTORY     : 21.7.96 first version created
******************************************************************************/

#include "hidef.h"

#include "non_bank.sgm"
#include "runtime.sgm"

#ifndef __HCS12X__ /* it's different for the HCS12X. See the text below at the #else // __HCS12X__ */

/*
   According to the -Cp option of the compiler the
   __DPAGE__, __PPAGE__ and __EPAGE__ macros are defined.
   If none of them is given as argument, then no page accesses should occur and
   this runtime routine should not be used !
   To be on the save side, the runtime routines are created anyway.
   If some of the -Cp options are given an adapted versions which only covers the
   needed cases is produced.
*/

/* if no compiler option -Cp is given, it is assumed that all possible are given : */

/* Compile with option -DHCS12 to activate this code */
#if defined(HCS12) || defined(_HCS12) || defined(__HCS12__) /* HCS12 family has PPAGE register only at 0x30 */
#define PPAGE_ADDR (0x30+REGISTER_BASE)
#ifndef __PPAGE__ /* may be set already by option -CPPPAGE */
#define __PPAGE__
#endif
/* Compile with option -DDG128 to activate this code */
#elif defined DG128 /* HC912DG128 derivative has PPAGE register only at 0xFF */
#define PPAGE_ADDR (0xFF+REGISTER_BASE)
#ifndef __PPAGE__ /* may be set already by option -CPPPAGE */
#define __PPAGE__
#endif
#elif defined(HC812A4)
/* all setting default to A4 already */
#endif


#if !defined(__EPAGE__) && !defined(__PPAGE__) && !defined(__DPAGE__)
/* as default use all page registers */
#define __DPAGE__
#define __EPAGE__
#define __PPAGE__
#endif

/* modify the following defines to your memory configuration */

#define EPAGE_LOW_BOUND   0x400u
#define EPAGE_HIGH_BOUND  0x7ffu

#define DPAGE_LOW_BOUND   0x7000u
#define DPAGE_HIGH_BOUND  0x7fffu

#define PPAGE_LOW_BOUND   (DPAGE_HIGH_BOUND+1)
#define PPAGE_HIGH_BOUND  0xBFFFu

#define REGISTER_BASE      0x0u
#ifndef DPAGE_ADDR
#define DPAGE_ADDR        (0x34u+REGISTER_BASE)
#endif
#ifndef EPAGE_ADDR
#define EPAGE_ADDR        (0x36u+REGISTER_BASE)
#endif
#ifndef PPAGE_ADDR
#define PPAGE_ADDR        (0x35u+REGISTER_BASE)
#endif

/*
  The following parts about the defines are assumed in the code of _GET_PAGE_REG :
  - the memory region controlled by DPAGE is above the area controlled by the EPAGE and
    below the area controlled by the PPAGE.
  - the lower bound of the PPAGE area is equal to be the higher bound of the DPAGE area + 1
*/
#if EPAGE_LOW_BOUND >= EPAGE_HIGH_BOUND || EPAGE_HIGH_BOUND >= DPAGE_LOW_BOUND || DPAGE_LOW_BOUND >= DPAGE_HIGH_BOUND || DPAGE_HIGH_BOUND >= PPAGE_LOW_BOUND || PPAGE_LOW_BOUND >= PPAGE_HIGH_BOUND
#error /* please adapt _GET_PAGE_REG for this non default page configuration */
#endif

#if DPAGE_HIGH_BOUND+1 != PPAGE_LOW_BOUND
#error /* please adapt _GET_PAGE_REG for this non default page configuration */
#endif


/* this module does either control if any access is in the bounds of the specified page or */
/* ,if only one page is specified, just use this page. */
/* This behavior is controlled by the define USE_SEVERAL_PAGES. */
/* If !USE_SEVERAL_PAGES does increase the performance significantly */
/* NOTE : When !USE_SEVERAL_PAGES, the page is also set for accesses outside of the area controlled */
/*        by this single page. But this is should not cause problems because the page is restored to the old value before any other access could occur */

#if !defined(__DPAGE__) && !defined(__EPAGE__) && !defined(__PPAGE__)
/* no page at all is specified */
/* only specifying the right pages will speed up these functions a lot */
#define USE_SEVERAL_PAGES 1
#elif defined(__DPAGE__) && defined(__EPAGE__) || defined(__DPAGE__) && defined(__PPAGE__) || defined(__EPAGE__) && defined(__PPAGE__)
/* more than one page register is used */
#define USE_SEVERAL_PAGES 1
#else

#define USE_SEVERAL_PAGES 0

#if defined(__DPAGE__) /* check which pages are used  */
#define PAGE_ADDR PPAGE_ADDR
#elif defined(__EPAGE__)
#define PAGE_ADDR EPAGE_ADDR
#elif defined(__PPAGE__)
#define PAGE_ADDR PPAGE_ADDR
#else /* we do not know which page, decide it at runtime */
#error /* must not happen */
#endif

#endif


#if USE_SEVERAL_PAGES /* only needed for several pages support */
/*--------------------------- _GET_PAGE_REG --------------------------------
  Runtime routine to detect the right register depending on the 16 bit offset part
  of an address.
  This function is only used by the functions below.

  Depending on the compiler options -Cp different versions of _GET_PAGE_REG are produced.

  Arguments :
  - Y : offset part of an address

  Result :
  if address Y is controlled by a page register :
  - X : address of page register if Y is controlled by an page register
  - Zero flag cleared
  - all other registers remain unchanged

  if address Y is not controlled by a page register :
  - Zero flag is set
  - all registers remain unchanged

  --------------------------- _GET_PAGE_REG ----------------------------------*/

#if defined(__DPAGE__)

#ifdef __cplusplus
extern "C"
#endif
#pragma NO_ENTRY
#pragma NO_EXIT
#pragma NO_FRAME

    static void NEAR _GET_PAGE_REG(void) { /*lint -esym(528, _GET_PAGE_REG) used in asm code */
    __asm {
    L_DPAGE:
        CPY     #DPAGE_LOW_BOUND  ;// test of lower bound of DPAGE
#if defined(__EPAGE__)
        BLO     L_EPAGE           ;// EPAGE accesses are possible
#else
        BLO     L_NOPAGE          ;// no paged memory below accesses
#endif
        CPY     #DPAGE_HIGH_BOUND ;// test of higher bound DPAGE/lower bound PPAGE
#if defined(__PPAGE__)
        BHI     L_PPAGE           ;// EPAGE accesses are possible
#else
        BHI     L_NOPAGE          ;// no paged memory above accesses
#endif
    FOUND_DPAGE:
        LDX     #DPAGE_ADDR       ;// load page register address and clear zero flag
        RTS

#if defined(__PPAGE__)
    L_PPAGE:
        CPY     #PPAGE_HIGH_BOUND ;// test of higher bound of PPAGE
        BHI     L_NOPAGE
    FOUND_PPAGE:
        LDX     #PPAGE_ADDR       ;// load page register address and clear zero flag
        RTS
#endif

#if defined(__EPAGE__)
    L_EPAGE:
        CPY     #EPAGE_LOW_BOUND  ;// test of lower bound of EPAGE
        BLO     L_NOPAGE
        CPY     #EPAGE_HIGH_BOUND ;// test of higher bound of EPAGE
        BHI     L_NOPAGE

    FOUND_EPAGE:
        LDX     #EPAGE_ADDR       ;// load page register address and clear zero flag
        RTS
#endif

    L_NOPAGE:
        ORCC    #0x04             ;// sets zero flag
        RTS
    }
}

#else /* !defined(__DPAGE__) */

#if defined( __PPAGE__ )

#ifdef __cplusplus
extern "C"
#endif
#pragma NO_ENTRY
#pragma NO_EXIT
#pragma NO_FRAME

    static void NEAR _GET_PAGE_REG(void) {	/*lint -esym(528, _GET_PAGE_REG) used in asm code */
    __asm {
    L_PPAGE:
        CPY     #PPAGE_LOW_BOUND  ;// test of lower bound of PPAGE
#if defined( __EPAGE__ )
        BLO     L_EPAGE
#else
BLO     L_NOPAGE          ;// no paged memory below
#endif
        CPY     #PPAGE_HIGH_BOUND ;// test of higher bound PPAGE
        BHI     L_NOPAGE
    FOUND_PPAGE:
        LDX     #PPAGE_ADDR       ;// load page register address and clear zero flag
        RTS
#if defined( __EPAGE__ )
    L_EPAGE:
        CPY     #EPAGE_LOW_BOUND  ;// test of lower bound of EPAGE
        BLO     L_NOPAGE
        CPY     #EPAGE_HIGH_BOUND ;// test of higher bound of EPAGE
        BHI     L_NOPAGE
    FOUND_EPAGE:
        LDX     #EPAGE_ADDR       ;// load page register address and clear zero flag
        RTS
#endif

    L_NOPAGE:
        ;// not in any allowed page area
        ;// its a far access to a non paged variable
        ORCC #0x04                ;// sets zero flag
        RTS
    }
}

#else /* !defined(__DPAGE__ ) && !defined( __PPAGE__) */
#if defined(__EPAGE__)

#ifdef __cplusplus
extern "C"
#endif
#pragma NO_ENTRY
#pragma NO_EXIT
#pragma NO_FRAME

    static void NEAR _GET_PAGE_REG(void) { /*lint -esym(528, _GET_PAGE_REG) used in asm code */
    __asm {
    L_EPAGE:
        CPY     #EPAGE_LOW_BOUND  ;// test of lower bound of EPAGE
        BLO     L_NOPAGE
        CPY     #EPAGE_HIGH_BOUND ;// test of higher bound of EPAGE
        BHI     L_NOPAGE
    FOUND_EPAGE:
        LDX     #EPAGE_ADDR       ;// load page register address and clear zero flag
        RTS

    L_NOPAGE:
        ;// not in any allowed page area
        ;// its a far access to a non paged variable
        ORCC    #0x04             ;// sets zero flag
        RTS
    }
}

#endif /*  defined(__EPAGE__) */
#endif /*  defined(__PPAGE__) */
#endif /*  defined(__DPAGE__) */

#endif /* USE_SEVERAL_PAGES */

/*--------------------------- _SET_PAGE --------------------------------
  Runtime routine to set the right page register. This routine is used if the compiler
  does not know the right page register, i.e. if the option -Cp is used for more than
  one pageregister or if the runtime option is used for one of the -Cp options.

  Arguments :
  - offset part of an address in the Y register
  - page part of an address in the B register

  Result :
  - page part written into the correct page register.
  - the old page register content is destroyed
  - all processor registers remains unchanged
  --------------------------- _SET_PAGE ----------------------------------*/

#ifdef __cplusplus
extern "C"
#endif
#pragma NO_ENTRY
#pragma NO_EXIT
#pragma NO_FRAME

    void NEAR _SET_PAGE(void) {
#if USE_SEVERAL_PAGES
    __asm {
        PSHX                      ;// save X register
        __PIC_JSR(_GET_PAGE_REG)
        BEQ     L_NOPAGE
        STAB    0,X               ;// set page register
    L_NOPAGE:
        PULX                      ;// restore X register
        RTS
    }
#else /* USE_SEVERAL_PAGES */
    __asm {
        STAB    PAGE_ADDR         ;// set page register
        RTS
    }
#endif /* USE_SEVERAL_PAGES */
}

/*--------------------------- _LOAD_FAR_8 --------------------------------
  This runtime routine is used to access paged memory via a runtime function.
  It may also be used if the compiler  option -Cp is not used with the runtime argument.

  Arguments :
  - offset part of an address in the Y register
  - page part of an address in the B register

  Result :
  - value to be read in the B register
  - all other registers remains unchanged
  - all page register still contain the same value
  --------------------------- _LOAD_FAR_8 ----------------------------------*/

#ifdef __cplusplus
extern "C"
#endif
#pragma NO_ENTRY
#pragma NO_EXIT
#pragma NO_FRAME

    void NEAR _LOAD_FAR_8(void) {
#if USE_SEVERAL_PAGES
    __asm {
        PSHX                      ;// save X register
        __PIC_JSR(_GET_PAGE_REG)
        BEQ     L_NOPAGE
        PSHA                      ;// save A register
        LDAA    0,X               ;// save page register
        STAB    0,X               ;// set page register
        LDAB    0,Y               ;// actual load, overwrites page
        STAA    0,X               ;// restore page register
        PULA                      ;// restore A register
        PULX                      ;// restore X register
        RTS
    L_NOPAGE:
        LDAB    0,Y               ;// actual load, overwrites page
        PULX                      ;// restore X register
        RTS
    }
#else /* USE_SEVERAL_PAGES */
    __asm {
        PSHA                      ;// save A register
        LDAA    PAGE_ADDR         ;// save page register
        STAB    PAGE_ADDR         ;// set page register
        LDAB    0,Y               ;// actual load, overwrites page
        STAA    PAGE_ADDR         ;// restore page register
        PULA                      ;// restore A register
        RTS
    }
#endif /* USE_SEVERAL_PAGES */
}

/*--------------------------- _LOAD_FAR_16 --------------------------------
  This runtime routine is used to access paged memory via a runtime function.
  It may also be used if the compiler  option -Cp is not used with the runtime argument.

  Arguments :
  - offset part of an address in the Y register
  - page part of an address in the B register

  Result :
  - value to be read in the Y register

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
激情成人午夜视频| 亚洲免费观看视频| 美女一区二区视频| 日韩一区二区三区视频在线 | 久久99久久精品| 91精品国产综合久久久蜜臀图片| 肉肉av福利一精品导航| 国产精品情趣视频| 91亚洲精品久久久蜜桃网站 | 亚洲另类在线制服丝袜| 在线免费视频一区二区| 五月婷婷激情综合| 日韩一级完整毛片| 国产高清精品在线| 1区2区3区国产精品| 91精彩视频在线| 日本亚洲三级在线| 精品国产免费久久| 99精品热视频| 午夜精品在线看| 久久久美女毛片| 色综合天天综合网国产成人综合天| 亚洲永久免费视频| 精品少妇一区二区三区在线播放 | 国产精品麻豆视频| 欧美午夜不卡视频| 狠狠色伊人亚洲综合成人| 亚洲国产精品成人久久综合一区 | 欧美三级日韩在线| 国内外成人在线| 亚洲精品水蜜桃| 日韩欧美中文一区| 成人免费观看视频| 日本欧美久久久久免费播放网| 国产欧美日韩在线看| 精品视频在线视频| 成人在线综合网| 日韩中文字幕亚洲一区二区va在线 | 这里是久久伊人| 丰满放荡岳乱妇91ww| 性欧美大战久久久久久久久| 久久久久国产一区二区三区四区| 99精品欧美一区二区蜜桃免费| 日本aⅴ精品一区二区三区 | 欧美大片在线观看| 在线免费视频一区二区| 风间由美中文字幕在线看视频国产欧美| 欧美午夜片在线观看| 国产精品影视在线观看| 性做久久久久久久免费看| 国产精品高清亚洲| 欧美xxxxxxxx| 欧美日韩成人高清| 色婷婷久久久亚洲一区二区三区| 国产美女在线精品| 亚洲一区二区在线播放相泽| 欧美国产日韩在线观看| 欧美成人女星排行榜| 在线精品视频免费观看| 成人午夜视频免费看| 麻豆成人在线观看| 午夜欧美在线一二页| 亚洲日本va在线观看| 国产精品亲子伦对白| 久久久欧美精品sm网站| 日韩女优毛片在线| 制服丝袜成人动漫| 欧美在线小视频| 亚洲欧美一区二区久久| 日韩亚洲国产中文字幕欧美| 国产精品自在在线| 日韩精品一二三区| 亚洲一区二区三区四区在线观看 | 久久人人97超碰com| 日韩欧美国产一区二区三区| 欧美伦理影视网| 欧美伊人精品成人久久综合97 | 欧美大胆人体bbbb| 91精品欧美一区二区三区综合在| 欧美在线观看视频一区二区三区| 99国产精品久久久久| 9色porny自拍视频一区二区| 国产99久久久精品| 国产成+人+日韩+欧美+亚洲| 国产在线不卡一卡二卡三卡四卡| 精品亚洲成a人在线观看| 久久国产精品露脸对白| 激情深爱一区二区| 国产一区二区三区在线看麻豆| 看片的网站亚洲| 黄色小说综合网站| 粉嫩av亚洲一区二区图片| 国产成人免费视频精品含羞草妖精| 国产一区二区三区四区五区美女 | 中文在线免费一区三区高中清不卡| 国产亚洲成av人在线观看导航| 国产日韩欧美精品在线| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 日韩精品成人一区二区三区| 蜜臀va亚洲va欧美va天堂 | 欧美在线观看禁18| 欧美日韩国产另类一区| 日韩一级成人av| 国产日产欧美一区二区三区 | 91在线视频在线| 欧美日韩免费一区二区三区| 91精品国产综合久久久蜜臀图片| wwwwxxxxx欧美| 亚洲丝袜自拍清纯另类| 午夜av一区二区三区| 国产一区二区三区av电影| 成人app下载| 在线不卡中文字幕播放| 精品sm捆绑视频| 亚洲免费观看高清完整版在线观看 | 午夜久久久久久久久| 激情欧美一区二区| 91香蕉视频mp4| 日韩精品影音先锋| 日韩美女啊v在线免费观看| 日韩在线观看一区二区| 成人一级黄色片| 欧美日韩国产综合一区二区三区| 亚洲精品一线二线三线无人区| 国产精品久久777777| 日韩激情视频网站| 99re热视频精品| 精品国产髙清在线看国产毛片| 亚洲视频一区在线| 狠狠色丁香婷婷综合久久片| 91麻豆精东视频| 精品成人一区二区三区四区| 一区二区三区高清| 国产成人综合亚洲网站| 欧美日韩一卡二卡三卡| 国产精品欧美经典| 美女一区二区在线观看| 在线影院国内精品| 久久久精品欧美丰满| 亚洲成av人影院| 91在线看国产| 久久久精品日韩欧美| 日韩电影在线免费观看| av中文字幕亚洲| 国产午夜久久久久| 免费人成在线不卡| 欧美日本在线观看| 一区二区三区视频在线观看 | 成人免费观看男女羞羞视频| 日韩欧美国产一区在线观看| 亚洲午夜久久久久久久久电影网| 成人高清伦理免费影院在线观看| 精品美女在线观看| 午夜精品久久久久久久蜜桃app| 99久久久久免费精品国产| 国产欧美精品在线观看| 秋霞电影网一区二区| 欧美丰满嫩嫩电影| 亚洲午夜久久久久久久久电影网| 一本色道久久综合亚洲aⅴ蜜桃| 国产精品视频免费| 国产白丝网站精品污在线入口| 欧美成人伊人久久综合网| 免费成人在线观看| 91精品国产综合久久精品| 日韩中文字幕1| 在线91免费看| 美女视频黄久久| 欧美日本国产一区| 日韩vs国产vs欧美| 欧美高清视频一二三区| 日本欧美一区二区在线观看| 欧美高清性hdvideosex| 日本va欧美va精品| 日韩欧美激情在线| 激情综合色综合久久综合| 日韩欧美成人午夜| 国模大尺度一区二区三区| 久久一二三国产| 午夜精品视频一区| 欧美成人乱码一区二区三区| 理论片日本一区| 日韩免费观看高清完整版 | 日本最新不卡在线| 日韩欧美精品在线视频| 国产乱码精品一区二区三区av| 久久精品视频一区二区三区| 国产盗摄一区二区三区| 亚洲日本中文字幕区| 欧美三级日韩三级| 免费观看在线色综合| 久久精品亚洲一区二区三区浴池| 国产成人综合在线观看| 国产精品女主播在线观看| 色成人在线视频| 日韩和欧美一区二区三区| 精品剧情在线观看| 成人激情免费视频| 亚欧色一区w666天堂| 久久女同精品一区二区|