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

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

?? datapage.c

?? dg128 飛思卡爾dg128 上實(shí)現(xiàn)AD轉(zhuǎn)化功能
?? C
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
/******************************************************************************
  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 */
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区在线免费视频| 日韩高清在线观看| 777奇米成人网| av高清久久久| 韩国理伦片一区二区三区在线播放 | 一区二区三区**美女毛片| 日韩欧美一级在线播放| 一本一本久久a久久精品综合麻豆| 麻豆精品一二三| 亚洲成a人v欧美综合天堂下载| 中文av一区二区| 欧美tk—视频vk| 911国产精品| 欧美日本一区二区三区| 99精品黄色片免费大全| 国产精品一区二区在线播放| 日本vs亚洲vs韩国一区三区二区 | 麻豆精品在线看| 亚洲国产日韩a在线播放| 国产精品久久免费看| 欧美成人福利视频| 欧美丰满少妇xxxxx高潮对白| 99精品视频一区二区| 国产成人免费9x9x人网站视频| 裸体一区二区三区| 亚洲电影在线免费观看| 一区二区三区在线视频免费 | 成人免费看片app下载| 激情av综合网| 精油按摩中文字幕久久| 日韩国产一二三区| 三级影片在线观看欧美日韩一区二区| 亚洲免费观看高清在线观看| 综合色中文字幕| ...xxx性欧美| 亚洲综合免费观看高清完整版在线| 久久成人精品无人区| 免费日韩伦理电影| 毛片一区二区三区| 麻豆久久久久久| 激情偷乱视频一区二区三区| 激情综合色综合久久| 久久国产精品99久久人人澡| 久久国产综合精品| 韩国欧美国产一区| 国产精品一区二区三区网站| 国产精品亚洲成人| 成人av在线资源网| 91丨porny丨首页| 欧美亚洲高清一区| 91精品国产综合久久久久久漫画 | 久久综合九色综合欧美98 | 久久久午夜精品| 中文字幕免费一区| 亚洲欧美激情一区二区| 亚洲一线二线三线视频| 丝袜国产日韩另类美女| 国产精品一二三区在线| 国内久久婷婷综合| 不卡一区二区三区四区| 在线观看视频一区二区| 91精品麻豆日日躁夜夜躁| 日韩制服丝袜先锋影音| 秋霞影院一区二区| 国产风韵犹存在线视精品| 91视频在线观看免费| 欧美精品久久一区二区三区 | 亚洲在线视频网站| 免费精品视频最新在线| 国产成人免费网站| 欧美午夜不卡视频| 久久中文娱乐网| 亚洲精品精品亚洲| 精品中文字幕一区二区| 99久久亚洲一区二区三区青草| 欧美亚洲国产一区在线观看网站 | 久久久91精品国产一区二区精品 | 国内成人免费视频| 91免费国产在线| 日韩欧美一级精品久久| 国产欧美日韩在线| 亚洲国产精品欧美一二99| 国内精品国产成人国产三级粉色 | 欧美大片在线观看| 国产精品福利影院| 美国十次综合导航| 色88888久久久久久影院野外| 日韩一区二区在线播放| 成人欧美一区二区三区小说| 琪琪久久久久日韩精品| 成人禁用看黄a在线| 91精品国产黑色紧身裤美女| 国产精品免费视频网站| 奇米影视一区二区三区小说| 成人黄色av网站在线| 91精品国产福利| 国产精品久久久久影院老司| 日本不卡视频一二三区| av福利精品导航| 日韩免费观看2025年上映的电影| 亚洲欧美偷拍卡通变态| 欧美一卡2卡三卡4卡5免费| 日韩毛片精品高清免费| 国产最新精品精品你懂的| 欧美丝袜丝交足nylons图片| 中文字幕第一区二区| 另类综合日韩欧美亚洲| 欧美亚洲国产bt| 国产精品天干天干在观线| 久久国产成人午夜av影院| 欧美在线一二三四区| 欧美精彩视频一区二区三区| 另类小说欧美激情| 欧美区视频在线观看| 成人免费在线观看入口| 国产99精品视频| 久久这里只有精品6| 日韩制服丝袜先锋影音| 在线观看免费成人| 国产精品丝袜黑色高跟| 国产精品一区二区三区乱码 | 国产日韩欧美不卡| 九九**精品视频免费播放| 日韩欧美一区二区不卡| 美国一区二区三区在线播放| 337p亚洲精品色噜噜噜| 无吗不卡中文字幕| 欧美日韩国产免费一区二区| 亚洲成人第一页| 欧美老女人在线| 视频在线在亚洲| 91精品免费观看| 免费观看91视频大全| 日韩一区二区三区在线视频| 日本一区中文字幕| 日韩欧美视频一区| 麻豆国产欧美日韩综合精品二区| 欧美一级一区二区| 九九精品一区二区| 国产午夜三级一区二区三| 国产精品中文字幕一区二区三区| 精品国产91乱码一区二区三区| 久久99久久精品| 精品电影一区二区| 国产精品一区免费在线观看| 国产欧美日本一区二区三区| 国产成人精品免费看| 国产精品久久久久精k8| 91免费在线看| 亚洲一二三四在线| 欧美精品乱人伦久久久久久| 日韩高清国产一区在线| 日韩欧美黄色影院| 国产高清精品久久久久| 一区在线观看免费| 欧美做爰猛烈大尺度电影无法无天| 亚洲成人激情社区| 久久综合狠狠综合| 91免费观看在线| 视频一区视频二区中文字幕| 欧美r级在线观看| 国产精品一区不卡| 中文一区二区在线观看| 欧美综合天天夜夜久久| 日本在线播放一区二区三区| 久久久www成人免费无遮挡大片| 懂色av一区二区三区蜜臀| 综合电影一区二区三区 | 精品视频免费看| 天天操天天干天天综合网| 精品奇米国产一区二区三区| 国产iv一区二区三区| 亚洲成av人在线观看| 国产午夜精品一区二区三区嫩草 | 午夜精品福利久久久| 日韩精彩视频在线观看| 久久久国产午夜精品| 欧美主播一区二区三区美女| 久久国产视频网| 亚洲精品久久久蜜桃| 精品国产91洋老外米糕| 97se狠狠狠综合亚洲狠狠| 日本怡春院一区二区| 国产精品久久久久久久蜜臀| 欧美男生操女生| 成人av在线资源| 久久99国产精品尤物| 亚洲欧美激情视频在线观看一区二区三区| 91精品国产乱码| 91色porny| 福利电影一区二区三区| 午夜激情综合网| 亚洲免费观看高清完整版在线 | 精品一区二区三区视频在线观看| 亚洲摸摸操操av| 欧美高清在线精品一区| 日韩一区二区三区免费看 | 久久久久久久综合| 欧美日韩国产电影| 色呦呦网站一区|