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

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

?? datapage.c

?? freescale scipooling freescale scipooling
?? 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 page register 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 */
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色av综合在线| 欧美成人精品二区三区99精品| 亚洲aⅴ怡春院| 国产日韩在线不卡| 欧美一区二区精美| 一本大道久久a久久综合婷婷| 国内精品伊人久久久久av一坑| 亚洲综合自拍偷拍| 国产精品免费aⅴ片在线观看| 911精品国产一区二区在线| 成人av高清在线| 精品中文字幕一区二区小辣椒| 亚洲妇熟xx妇色黄| 成人欧美一区二区三区小说| 欧美白人最猛性xxxxx69交| 欧美视频一区在线| 91在线免费视频观看| 精品一区二区三区免费| 男女男精品视频网| 亚洲成a人v欧美综合天堂下载| 亚洲色欲色欲www| 国产精品蜜臀在线观看| 精品国产伦一区二区三区免费| 欧美精品久久久久久久久老牛影院| 97精品久久久午夜一区二区三区 | 日韩视频免费观看高清完整版 | 精品国产1区二区| 欧美剧情片在线观看| 在线观看亚洲a| 在线免费观看日本一区| 一本久道中文字幕精品亚洲嫩| 国产69精品一区二区亚洲孕妇| 国产一区二区三区电影在线观看 | 国产成人免费高清| 国产电影一区二区三区| 国产真实乱子伦精品视频| 另类欧美日韩国产在线| 日本伊人精品一区二区三区观看方式| 亚洲国产中文字幕| 亚洲亚洲精品在线观看| 亚洲国产成人av| 日韩精品五月天| 久久草av在线| 国产一区二区免费视频| 国产精品一级二级三级| 成熟亚洲日本毛茸茸凸凹| 国产精品一卡二| 不卡一区中文字幕| 99久久国产综合精品色伊| 99re热视频精品| 欧美主播一区二区三区| 欧美日韩一区久久| 一区二区三区日韩在线观看| 中文字幕一区二| 一区二区三区影院| 午夜国产精品一区| 蜜芽一区二区三区| 国产精品自拍一区| 成人国产精品免费观看动漫| 色综合久久综合中文综合网| 欧美日韩精品免费| 日韩一区二区免费视频| 久久久久一区二区三区四区| 亚洲国产成人午夜在线一区| 国产精品对白交换视频 | 国产一区二区剧情av在线| 国产精品1区2区| 色综合欧美在线视频区| 91超碰这里只有精品国产| 欧美大片在线观看| 国产亚洲视频系列| 一区二区三区日韩欧美| 久久99精品国产91久久来源| 不卡视频在线看| 欧美日韩国产大片| 久久久精品日韩欧美| 一区二区三区在线看| 激情小说欧美图片| 9人人澡人人爽人人精品| 欧美一区三区二区| 国产精品久久久久一区| 日韩福利视频导航| 成人性生交大合| 欧美肥胖老妇做爰| 欧美激情一区二区三区不卡 | 亚洲国产高清不卡| 午夜精品久久久久久久久久| 国产成人自拍高清视频在线免费播放| 日本精品一级二级| 337p粉嫩大胆噜噜噜噜噜91av| 亚洲精品国产精品乱码不99 | 亚洲成人免费看| 国产99精品视频| 欧美精品在线一区二区三区| 国产拍欧美日韩视频二区| 偷拍与自拍一区| 99国产一区二区三精品乱码| 日韩午夜在线观看| 亚洲日韩欧美一区二区在线| 久久精品免费观看| 欧美丝袜第三区| 日本一二三不卡| 老司机午夜精品| 欧美色男人天堂| 一区在线中文字幕| 美腿丝袜亚洲一区| 精品视频一区二区不卡| 综合久久久久综合| 日韩欧美一区在线观看| 亚洲精品成人少妇| 成人国产免费视频| 久久久国产午夜精品| 日韩av网站免费在线| 色域天天综合网| 亚洲欧洲无码一区二区三区| 国产成人免费视| 欧美精品一区二区三区蜜桃视频| 丝袜脚交一区二区| 欧洲一区二区三区在线| 成人欧美一区二区三区| 国产成a人无v码亚洲福利| www国产成人免费观看视频 深夜成人网| 亚洲永久精品大片| 色天使色偷偷av一区二区| 国产精品传媒入口麻豆| 成人午夜免费电影| 欧美激情一区二区三区不卡| 国产一区二区三区四| 久久久综合网站| 国产精华液一区二区三区| 亚洲精品一线二线三线无人区| 捆绑调教一区二区三区| 欧美xxxx在线观看| 捆绑变态av一区二区三区| 精品国产三级a在线观看| 蜜桃av一区二区三区电影| 欧美xxxx老人做受| 国产精品一二一区| 欧美激情一区二区三区全黄 | 成人高清免费观看| 中文av一区二区| 99精品欧美一区二区三区小说| 国产精品私人影院| 99久久er热在这里只有精品66| 亚洲同性同志一二三专区| 色噜噜夜夜夜综合网| 午夜精品国产更新| 日韩欧美国产电影| 国产99久久久国产精品潘金 | av电影天堂一区二区在线观看| 国产精品久久久爽爽爽麻豆色哟哟| 99riav一区二区三区| 亚洲在线观看免费| 日韩一级片在线播放| 国产一区二区三区免费在线观看| 中文字幕不卡三区| 91蝌蚪porny九色| 婷婷成人激情在线网| 精品国内片67194| kk眼镜猥琐国模调教系列一区二区| 亚洲日本丝袜连裤袜办公室| 色婷婷久久久综合中文字幕| 日韩国产欧美在线播放| 久久久噜噜噜久久中文字幕色伊伊| av电影一区二区| 首页综合国产亚洲丝袜| 久久综合丝袜日本网| 色综合天天综合| 久久精品亚洲精品国产欧美| 不卡的电影网站| 日韩精品成人一区二区在线| 久久日韩精品一区二区五区| aaa欧美色吧激情视频| 天天色天天操综合| 欧美激情一区在线| 在线播放国产精品二区一二区四区 | 在线免费精品视频| 精品在线一区二区三区| 一区二区中文视频| 日韩三级av在线播放| av中文字幕不卡| 麻豆久久久久久| 亚洲人成亚洲人成在线观看图片 | 色婷婷综合五月| 国内不卡的二区三区中文字幕 | 久久99日本精品| 一区二区在线看| 国产亚洲精品中文字幕| 欧美日韩一本到| 成人看片黄a免费看在线| 日韩国产高清影视| 亚洲免费视频中文字幕| 精品少妇一区二区三区视频免付费| hitomi一区二区三区精品| 日本美女一区二区三区| 亚洲免费在线电影| 国产精品全国免费观看高清| 欧美一区二区三区性视频| 在线欧美小视频| www.激情成人|