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

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

?? datapage.c

?? 用C語言寫的CCD攝像頭數據采集源代碼
?? 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一区二区三区免费野_久草精品视频
亚洲三级视频在线观看| 一区二区三区中文在线| 日韩理论片中文av| 美腿丝袜一区二区三区| 一本久久a久久精品亚洲| 精品国产成人系列| 亚洲v中文字幕| 成人av集中营| 久久久国产精品午夜一区ai换脸| 亚洲国产精品一区二区www在线| 国产精品一区二区免费不卡| 欧美日韩一区二区三区免费看| 中文字幕第一区二区| 日韩精品一级二级| 欧美手机在线视频| 亚洲欧美一区二区久久| 风间由美一区二区av101| 日韩亚洲欧美在线观看| 一区二区三区欧美久久| 成人av高清在线| 国产日产欧美一区二区视频| 另类小说综合欧美亚洲| 欧美乱妇23p| 午夜欧美在线一二页| 色天天综合色天天久久| 国产精品传媒入口麻豆| 高清不卡一二三区| 日本一区二区三级电影在线观看| 国产精品影视天天线| 久久亚洲精精品中文字幕早川悠里| 三级不卡在线观看| 欧美一区二区视频在线观看| 亚洲午夜精品网| 欧美日本在线播放| 亚洲h精品动漫在线观看| 欧美色窝79yyyycom| 午夜影院久久久| 337p亚洲精品色噜噜狠狠| 天堂精品中文字幕在线| 制服丝袜日韩国产| 蜜臀99久久精品久久久久久软件| 4438x亚洲最大成人网| 久久激情五月激情| 精品免费视频一区二区| 国精产品一区一区三区mba桃花 | 日本韩国一区二区三区| 亚洲精品成人a在线观看| 99久久免费精品| 亚洲精品乱码久久久久久日本蜜臀| 色狠狠色狠狠综合| 日韩精品国产欧美| 久久综合国产精品| caoporn国产精品| 亚洲色图.com| 在线不卡中文字幕| 国产在线视视频有精品| 国产精品欧美精品| 欧美日韩一区小说| 国产麻豆成人传媒免费观看| 国产精品久久夜| 欧美亚洲国产一区二区三区| 免费看精品久久片| 国产精品免费aⅴ片在线观看| 91首页免费视频| 久久成人av少妇免费| 国产精品高潮呻吟| 欧美狂野另类xxxxoooo| 激情亚洲综合在线| 国产精品久久久久aaaa樱花| 91丨九色丨尤物| 久久激情综合网| 国产精品免费视频一区| 一本久久精品一区二区| 日韩va亚洲va欧美va久久| 久久中文娱乐网| 99久久精品免费| 丝袜国产日韩另类美女| 久久精品一区蜜桃臀影院| 一本色道久久加勒比精品| 午夜精品福利一区二区三区蜜桃| 久久只精品国产| 色天天综合久久久久综合片| 日本三级亚洲精品| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 一区二区在线观看免费| 欧美日韩精品福利| 国产一区二区美女| 中文字幕不卡的av| 欧美丰满少妇xxxxx高潮对白 | ...av二区三区久久精品| 在线这里只有精品| 国产毛片精品一区| 亚洲精品乱码久久久久久久久| 欧美日韩国产成人在线91| 国产一区免费电影| 亚洲午夜影视影院在线观看| 精品国产污网站| 精品视频一区二区三区免费| 国产精品资源在线看| 天天色天天爱天天射综合| 国产精品久久毛片| 91国偷自产一区二区三区观看| 粉嫩蜜臀av国产精品网站| 日韩精品国产精品| 亚洲欧美一区二区三区久本道91| 欧美精品一区男女天堂| 欧美图区在线视频| 91尤物视频在线观看| 久久97超碰国产精品超碰| 亚洲一区二区三区国产| 国产亚洲污的网站| 精品久久人人做人人爱| 欧美日韩综合在线| 播五月开心婷婷综合| 亚洲福利视频导航| 一区二区三区在线看| 国产精品久久午夜| 久久精品男人天堂av| 国产日韩欧美高清在线| 精品国产一区a| 91精品国产乱码| 欧美日韩美女一区二区| 欧美色成人综合| 欧美色涩在线第一页| 不卡的电视剧免费网站有什么| 丰满少妇在线播放bd日韩电影| 国产福利精品一区二区| 九九精品视频在线看| 久久99这里只有精品| 免费在线观看日韩欧美| 蜜臀精品一区二区三区在线观看| 香蕉加勒比综合久久| 亚洲成人av福利| 国产精品成人网| 亚洲美女精品一区| 亚洲久草在线视频| 一区二区三区四区国产精品| 亚洲欧洲av另类| 亚洲欧美日韩国产另类专区| 18欧美亚洲精品| 亚洲国产一区二区三区青草影视 | 国产精品欧美一区二区三区| 日本一区二区成人| 国产精品成人在线观看| 亚洲人成网站色在线观看| 欧美国产亚洲另类动漫| 亚洲欧美国产三级| 视频一区二区中文字幕| 蜜臀av一区二区三区| 国产综合久久久久久鬼色| 国产黄色91视频| 91丨九色丨国产丨porny| av午夜一区麻豆| 日韩一级视频免费观看在线| 精品国产一区二区亚洲人成毛片| 国产午夜精品理论片a级大结局 | 日韩一区二区三区免费看 | 欧美tickle裸体挠脚心vk| 91精品视频网| 中文在线一区二区| 亚洲精品免费一二三区| 视频一区免费在线观看| 国产精品99久| 在线观看亚洲一区| 日韩一区二区三区视频在线观看 | 在线免费观看成人短视频| 欧美日韩久久久久久| 久久久青草青青国产亚洲免观| 一色屋精品亚洲香蕉网站| 亚洲图片欧美视频| 麻豆精品在线播放| 欧美在线观看视频在线| 精品少妇一区二区| 亚洲欧美电影院| 国产综合色精品一区二区三区| 99热在这里有精品免费| 欧美tickling挠脚心丨vk| 国产精品视频观看| 秋霞午夜av一区二区三区| 成人黄色软件下载| 欧美电视剧在线观看完整版| 亚洲人成人一区二区在线观看| 麻豆精品在线播放| 国产91高潮流白浆在线麻豆| 91碰在线视频| 中文字幕欧美日韩一区| 日韩国产精品久久久| 色老综合老女人久久久| 久久亚洲一级片| 日韩av电影天堂| 国内外精品视频| 日韩一级精品视频在线观看| 一区二区三区不卡在线观看| 国产精品一区一区| 日韩美女视频在线| 亚洲国产欧美日韩另类综合 | 九色|91porny| 欧美日韩中文字幕一区| 国产精品福利一区二区| 国产精品主播直播|