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

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

?? 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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲天堂精品视频| 欧美激情在线看| 99久久夜色精品国产网站| 狠狠色狠狠色综合| 97se亚洲国产综合自在线不卡| 国产精品香蕉一区二区三区| 国产伦精品一区二区三区视频青涩| 久久精品国产成人一区二区三区| 免费观看在线综合| 久久电影网站中文字幕| 麻豆精品视频在线观看免费| 久久国产精品一区二区| 国产精品一区免费在线观看| 国产91对白在线观看九色| 99精品视频中文字幕| 欧美三级电影一区| 欧美精品成人一区二区三区四区| 91麻豆精品91久久久久同性| 欧美日本一区二区三区| 7777女厕盗摄久久久| 欧美一级在线视频| 久久免费看少妇高潮| 一区精品在线播放| 亚洲手机成人高清视频| 亚洲成人免费看| 国产一区二区视频在线播放| 国产91精品入口| 色嗨嗨av一区二区三区| 日韩视频一区二区| 亚洲国产成人在线| 天天做天天摸天天爽国产一区 | 国产网红主播福利一区二区| 国产亚洲精品免费| 亚洲视频一区在线| 奇米亚洲午夜久久精品| 国产精品香蕉一区二区三区| 色视频一区二区| 久久综合九色综合欧美98 | 一区二区三区小说| 久久国产欧美日韩精品| 欧美日韩亚洲综合在线 | 欧美在线观看禁18| 91在线观看污| 久久综合九色综合欧美亚洲| 国产91露脸合集magnet| 国产麻豆成人传媒免费观看| 国产米奇在线777精品观看| 蜜臂av日日欢夜夜爽一区| 日韩精品欧美精品| 日韩亚洲欧美综合| 久久综合久久鬼色| 久久精品久久精品| 4438x亚洲最大成人网| 日本最新不卡在线| 精品久久久久久综合日本欧美| 久久九九国产精品| 久久精品国产在热久久| 一本一道综合狠狠老| 欧美国产一区视频在线观看| 99精品在线免费| 国产精品亚洲午夜一区二区三区 | 色综合久久久久久久久久久| 综合久久一区二区三区| 91麻豆产精品久久久久久| 一区二区三区久久久| 国产清纯美女被跳蛋高潮一区二区久久w| 福利一区在线观看| 欧美网站大全在线观看| 欧美美女一区二区在线观看| 26uuu国产在线精品一区二区| 欧美精品在线视频| 亚洲成人www| 日韩欧美自拍偷拍| 亚洲综合另类小说| 日韩中文字幕亚洲一区二区va在线| 国产麻豆欧美日韩一区| 久久久国产精华| 91丨porny丨首页| 亚洲一区二区三区三| 欧美成人精品福利| 一本色道久久综合精品竹菊| 日韩不卡手机在线v区| 亚洲国产精品成人久久综合一区| 欧美在线一区二区三区| 国产在线播放一区三区四| 亚洲欧美视频一区| 久久久国产综合精品女国产盗摄| 色悠悠久久综合| 国产一区二区三区四区在线观看| 亚洲黄一区二区三区| 久久精品一区八戒影视| 欧美日韩国产一区| 成人免费看片app下载| 日韩经典一区二区| 亚洲少妇最新在线视频| 亚洲精品一区二区三区在线观看| 91黄色免费版| 欧美久久久久久久久久| 国产午夜精品一区二区三区四区| 欧美男女性生活在线直播观看| www.久久精品| 国产乱国产乱300精品| 五月激情综合色| 亚洲精品国产第一综合99久久 | 国产一区二区在线免费观看| 亚洲女人****多毛耸耸8| 欧美精品一区二区久久婷婷| 欧美日韩激情在线| 色综合婷婷久久| 国产成人精品免费在线| 激情综合色综合久久| 午夜视频一区在线观看| 亚洲一区二区三区中文字幕在线| 亚洲情趣在线观看| 日韩美女视频19| 亚洲天堂福利av| 综合婷婷亚洲小说| 国产精品欧美极品| 国产日韩精品一区| 欧美精彩视频一区二区三区| 国产欧美日韩另类一区| 国产精品美女一区二区三区| 中文一区在线播放| 国产精品久99| 亚洲精品免费电影| 亚洲地区一二三色| 日韩精品一级中文字幕精品视频免费观看| 一区二区三区四区在线播放| 亚洲自拍欧美精品| 三级欧美在线一区| 久久国产精品99精品国产| 国产真实乱子伦精品视频| 国产伦精品一区二区三区免费| 国产麻豆精品一区二区| 中文字幕中文字幕一区二区| 成人欧美一区二区三区在线播放| 国产精品久久三| 亚洲免费三区一区二区| 亚洲国产综合91精品麻豆| 午夜伦欧美伦电影理论片| 人人精品人人爱| 顶级嫩模精品视频在线看| 色婷婷久久久久swag精品| 欧美日韩电影在线| 亚洲精品一区二区在线观看| 国产精品萝li| 亚洲国产一二三| 国产精品中文字幕一区二区三区| 99精品偷自拍| 在线成人免费观看| 欧美激情在线观看视频免费| 亚洲伊人伊色伊影伊综合网| 另类小说综合欧美亚洲| 成人av免费网站| 日韩视频一区二区三区在线播放| 国产精品私人影院| 五月天中文字幕一区二区| 国产精品77777竹菊影视小说| 91一区一区三区| 日韩欧美色电影| 亚洲男人的天堂网| 激情深爱一区二区| 色婷婷综合久久久中文一区二区 | 久久狠狠亚洲综合| 91欧美激情一区二区三区成人| 日韩一级片网址| 亚洲精品中文字幕在线观看| 国产一区二区三区av电影| 欧美日韩国产成人在线免费| 欧美国产精品一区| 久草这里只有精品视频| 91豆麻精品91久久久久久| 26uuu精品一区二区| 亚洲成人7777| 91在线无精精品入口| 久久久亚洲精华液精华液精华液| 五月天视频一区| 色欧美日韩亚洲| 国产精品麻豆一区二区| 国产毛片精品视频| 日韩一卡二卡三卡国产欧美| 亚洲国产精品精华液网站| 成人激情免费网站| 26uuu国产一区二区三区| 日韩黄色片在线观看| 欧美在线观看视频一区二区| 最新欧美精品一区二区三区| 国产激情视频一区二区在线观看 | 成人午夜免费视频| 精品国产制服丝袜高跟| 日本欧美在线看| 欧美日本国产一区| 一区二区成人在线| 91在线视频观看| 亚洲乱码中文字幕| 91蜜桃传媒精品久久久一区二区 | 久久久久久亚洲综合| 理论电影国产精品| 日韩女优视频免费观看| 美腿丝袜在线亚洲一区|