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

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

?? datapage.c

?? 只是一個基于飛思卡爾十六位單片機編寫的C一個例程SPI
?? C
?? 第 1 頁 / 共 5 頁
字號:
        BRA     done

L_NOPAGE:
        MOVW    0,SP, 0,Y         ;// store the value passed in X (high word)
        STD           2,Y         ;// store the value passed in D (low word)
done:
        PULX                      ;// restore X register
        MOVW    0,SP, 1,+SP       ;// move return address
        RTS
  }
#else /* USE_SEVERAL_PAGES */
  __asm {
        PSHD                      ;// save D register
        LDAA    PAGE_ADDR         ;// save page register
        LDAB    4,SP              ;// load page part of address
        STAB    PAGE_ADDR         ;// set page register
        STX     0,Y               ;// store the value passed in X
        MOVW    0,SP, 2,Y         ;// store the value passed in D (low word)
        STAA    PAGE_ADDR         ;// restore page register
        PULD                      ;// restore D register
        MOVW    0,SP, 1,+SP       ;// move return address
        RTS
  }
#endif /* USE_SEVERAL_PAGES */
}

/*--------------------------- _FAR_COPY_RC --------------------------------
  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 the source int the X register
  - page part of the source in the A register
  - offset part of the dest int the Y register
  - page part of the dest in the B register
  - number of bytes to be copied is defined by the next 2 bytes after the return address.

  Result :
  - memory area copied
  - no registers are saved, i.e. all registers may be destroyed
  - all page register still contain the same value as before the call
  - the function returns after the constant defining the number of bytes to be copied


  stack-structure at the loop-label:
     0,SP : destination offset
     2,SP : source page
     3,SP : destination page
     4,SP : source offset
     6,SP : points to length to be copied. This function returns after the size

  A usual call to this function looks like:

  struct Huge src, dest;
    ; ...
    LDX  #src
    LDAA #PAGE(src)
    LDY  #dest
    LDAB #PAGE(dest)
    JSR  _FAR_COPY_RC
    DC.W sizeof(struct Huge)
    ; ...

  --------------------------- _FAR_COPY_RC ----------------------------------*/

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

void NEAR _FAR_COPY_RC(void) {
#if USE_SEVERAL_PAGES
  __asm {
        DEX                       ;// source addr-=1, because loop counter ends at 1
        PSHX                      ;// save source offset
        PSHD                      ;// save both pages
        DEY                       ;// destination addr-=1, because loop counter ends at 1
        PSHY                      ;// save destination offset
        LDY     6,SP              ;// Load Return address
        LDX     2,Y+              ;// Load Size to copy
        STY     6,SP              ;// Store adjusted return address
loop:
        LDD     4,SP              ;// load source offset
        LEAY    D,X               ;// calculate actual source address
        LDAB    2,SP              ;// load source page
        __PIC_JSR(_LOAD_FAR_8)    ;// load 1 source byte
        PSHB                      ;// save value
        LDD     0+1,SP            ;// load destination offset
        LEAY    D,X               ;// calculate actual destination address
        PULA                      ;// restore value
        LDAB    3,SP              ;// load destination page
        __PIC_JSR(_STORE_FAR_8)   ;// store one byte
        DEX
        BNE     loop
        LEAS    6,SP              ;// release stack
        _SRET                     ;// debug info only: This is the last instr of a function with a special return
        RTS                       ;// return
  }
#else
  __asm {
        PSHD                      ;// store page registers
        TFR     X,D
        PSHY                      ;// temporary space
        LDY     4,SP              ;// load return address
        ADDD    2,Y+              ;// calculate source end address. Increment return address
        STY     4,SP
        PULY
        PSHD                      ;// store src end address
        LDAB    2,SP              ;// reload source page
        LDAA    PAGE_ADDR         ;// save page register
        PSHA
loop:
        STAB    PAGE_ADDR         ;// set source page
        LDAA    1,X+              ;// load value
        MOVB    4,SP, PAGE_ADDR   ;// set destination page
        STAA    1,Y+
        CPX     1,SP
        BNE     loop

        LDAA    5,SP+             ;// restore old page value and release stack
        STAA    PAGE_ADDR         ;// store it into page register
        _SRET                     ;// debug info only: This is the last instr of a function with a special return
        RTS
  }
#endif
}

/*--------------------------- _FAR_COPY --------------------------------

  The _FAR_COPY runtime routine was used to copied large memory blocks in previous compiler releases.
  However this release now does use _FAR_COPY_RC instead. The only difference is how the size of 
  the area to be copied is passed into the function. For _FAR_COPY the size is passed on the stack just
  above the return address. _FAR_COPY_RC does expect the return address just after the JSR _FAR_COPY_RC call
  in the code of the caller. This allows for denser code calling _FAR_COPY_RC but does also need a slightly
  larger runtime routine and it is slightly slower.
  The _FAR_COPY routine is here now mainly for compatibility with previous releases. 
  The current compiler does not use it. 
  
--------------------------- _FAR_COPY ----------------------------------*/

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

void NEAR _FAR_COPY(void) {
#if USE_SEVERAL_PAGES
  __asm {
        DEX                       ;// source addr-=1, because loop counter ends at 1
        PSHX                      ;// save source offset
        PSHD                      ;// save both pages
        DEY                       ;// destination addr-=1, because loop counter ends at 1
        PSHY                      ;// save destination offset
        LDX     8,SP              ;// load counter, assuming counter > 0

loop:
        LDD     4,SP              ;// load source offset
        LEAY    D,X               ;// calculate actual source address
        LDAB    2,SP              ;// load source page
        __PIC_JSR(_LOAD_FAR_8)    ;// load 1 source byte
        PSHB                      ;// save value
        LDD     0+1,SP            ;// load destination offset
        LEAY    D,X               ;// calculate actual destination address
        PULA                      ;// restore value
        LDAB    3,SP              ;// load destination page
        __PIC_JSR(_STORE_FAR_8)   ;// store one byte
        DEX
        BNE     loop
        LDX     6,SP              ;// load return address
        LEAS    10,SP             ;// release stack
        JMP     0,X               ;// return
  }
#else
  __asm {
        PSHD                      ;// store page registers
        TFR     X,D
        ADDD    4,SP              ;// calculate source end address
        STD     4,SP
        PULB                      ;// reload source page
        LDAA    PAGE_ADDR         ;// save page register
        PSHA
loop:
        STAB    PAGE_ADDR         ;// set source page
        LDAA    1,X+              ;// load value
        MOVB    1,SP, PAGE_ADDR   ;// set destination page
        STAA    1,Y+
        CPX     4,SP
        BNE     loop

        LDAA    2,SP+             ;// restore old page value and release stack
        STAA    PAGE_ADDR         ;// store it into page register
        LDX     4,SP+             ;// release stack and load return address
        JMP     0,X               ;// return
  }
#endif
}

#else  /* __HCS12X__  */

/*
  The HCS12X knows two different kind of addresses:
    - Logical addresses. E.g.
       MOVB #page(var),RPAGE
       INC var

    - Global addresses E.g.
       MOVB #page(var),GPAGE
       GLDAA var
       INCA
       GSTAA var

  Global addresses are used with G-Load's and G-Store's, logical addresses are used for all the other instructions
  and occasions. As HC12's or HCS12's do not have the G-Load and G-Store instructions,
  global addresses are not used with these processor families.
  They are only used with HCS12X chips (and maybe future ones deriving from a HCS12X).

  Logical and Global addresses can point to the same object, however the global and logical address of an object
  are different for most objects (actually for all except the registers from 0 to 0x7FF).
  Therefore the compiler needs to transform in between them.

  HCS12X Pointer types:

    The following are logical addresses:
    - all 16 bit pointers
       - "char* __near": always.
       - "char *" in the small and banked memory model
    - 24 bit dpage, epage, ppage or rpage pointers (*1) (note: the first HCS12X compilers may not support these pointer types)
       - "char *__dpage": Note this type only exists for
                          orthogonality with the HC12 A4 chip which has a DPAGE reg.
                          It does not apply to the HCS12X.
       - "char *__epage": 24 bit pointer using the EPAGE register
       - "char *__ppage": 24 bit pointer using the PPAGE register.
                          As the PPAGE is also used for BANKED code,
                          using this pointer type is only legal from non banked code.
       - "char *__rpage": 24 bit pointer using the RPAGE register


    The following are global addresses:
       "char*": in the large memory model (only HCS12X)
       "char* __far": always for HCS12X.

   (*1): For the HC12 and HCS12 "char* __far" and "char*" in the large memory model are also logical.

   Some notes for the HC12/HCS12 programmers.

   The address of a far object for a HC12 and for a HCS12X is different, even if they are at the same place in the memory map.
   For the HC12, a far address is using the logical addresses, for the HCS12X however, far addresses are using global addresses.
   This does cause troubles for the unaware!
   
   The conversion routines implemented in this file support the special HCS12XE RAM mapping (when RAMHM is set).
   To enable this mapping compile this file with the "-MapRAM" compiler option.

  HCS12X Logical Memory map

    Logical Addresses           Used for                shadowed at           page register     Global Address

    0x000000 .. 0x0007FF        Peripheral Registers                          Not Paged         0x000000
    0x??0800 .. 0x??0BFF        Paged EEPROM                                  EPAGE (@0x17)     0x100000+EPAGE*0x0400
    0x000C00 .. 0x000FFF        Non Paged EEPROM        0xFF0800..0xFF0FFF    Not Paged         0x13FC00
    0x??1000 .. 0x??1FFF        Paged RAM                                     RPAGE (@0x16)     0x000000+RPAGE*0x1000
    0x002000 .. 0x003FFF        Non Paged RAM           0xFE1000..0xFF1FFF    Not Paged         0x0FE000
    0x004000 .. 0x007FFF        Non Paged FLASH         0xFC8000..0xFCBFFF    Not Paged         0x7F4000
    0x??8000 .. 0x00BFFF        Paged FLASH                                   PPAGE (@0x30)     0x400000+PPAGE*0x4000
    0x00C000 .. 0x00FFFF        Non Paged FLASH         0xFF8000..0xFFBFFF    Not Paged         0x7FC000

    NA: Not Applicable

  HCS12X Global Memory map

    Global Addresses            Used for                Logical mapped at

    0x000000 .. 0x0007FF        Peripheral Registers    0x000000 .. 0x0007FF
    0x000800 .. 0x000FFF        DMA registers           Not mapped
    0x001000 .. 0x0FFFFF        RAM                     0x??1000 .. 0x??1FFF
    0x0FE000 .. 0x0FFFFF        RAM, Log non paged      0x002000 .. 0x003FFF
    0x100000 .. 0x13FFFF        EEPROM                  0x??0800 .. 0x??0BFF
    0x13FC00 .. 0x13FFFF        EEPROM  non paged       0x000C00 .. 0x000FFF
    0x140000 .. 0x3FFFFF        External Space          Not mapped
    0x400000 .. 0x7FFFFF        FLASH                   0x??8000 .. 0x??BFFF
    0x7F4000 .. 0x7F7FFF        FLASH, Log non paged    0x004000 .. 0x007FFF
    0x7FC000 .. 0x7FFFFF        FLASH, Log non paged    0x00C000 .. 0x00FFFF

  HCS12X Logical Memory map (RAM mapped) 

    Logical Addresses           Used for                shadowed at           page register     Global Address

    0x000000 .. 0x0007FF        Peripheral Registers                          Not Paged         0x000000
    0x??0800 .. 0x??0BFF        Paged EEPROM                                  EPAGE (@0x17)     0x100000+EPAGE*0x0400
    0x000C00 .. 0x000FFF        Non Paged EEPROM        0xFF0800..0xFF0FFF    Not Paged         0x13FC00
    0x??1000 .. 0x??1FFF        Paged RAM                                     RPAGE (@0x16)     0x000000+RPAGE*0x1000
    0x002000 .. 0x003FFF        Non Paged RAM           0xFE1000..0xFF1FFF    Not Paged         0x0FE000
    0x004000 .. 0x007FFF        Non Paged RAM           0xFA1000..0xFD1FFF    Not Paged         0FC000
    0x??8000 .. 0x00BFFF        Paged FLASH                                   PPAGE (@0x30)     0x400000+PPAGE*0x4000
    0x00C000 .. 0x00FFFF        Non Paged FLASH         0xFF8000..0xFFBFFF    Not Paged         0x7FC000

    NA: Not Applicable

  HCS12X Global Memory map

    Global Addresses            Used for                Logical mapped at

    0x000000 .. 0x0007FF        Peripheral Registers    0x000000 .. 0x0007FF
    0x000800 .. 0x000FFF        DMA registers           Not mapped
    0x001000 .. 0x0FFFFF        RAM                     0x??1000 .. 0x??1FFF
    0x0FA000 .. 0x0FFFFF        RAM, Log non paged      0x002000 .. 0x007FFF
    0x100000 .. 0x13FFFF        EEPROM                  0x??0800 .. 0x??0BFF
    0x13FC00 .. 0x13FFFF        EEPROM  non paged       0x000C00 .. 0x000FFF
    0x140000 .. 0x3FFFFF        External Space          Not mapped
    0x400000 .. 0x7FFFFF        FLASH                   0x??8000 .. 0x??BFFF
    0x7F4000 .. 0x7F7FFF        FLASH, Log non paged    Not mapped
    0x7FC000 .. 0x7FFFFF        FLASH, Log non paged    0x00C000 .. 0x00FFFF


  How to read this table:
    For logical addresses, the lower 16 bits of the address do determine in which area the address is,
    if this address is paged, then this entry also controls and which of the EPAGE, PPAGE or RPAGE
    page register is controlling the bits 16 to 23 of the address.
    For global addresses, the bits 16 to 23 have to be in the GPAGE register and the lower 16 bits
    have to be used with the special G load or store instructions (e.g. GLDAA).
    As example the logical address 0x123456 is invalid. Because its lower bits 0x3456 are in a
    non paged area, so the page 0x12 does not exist.
    The address 0xFE1020 however does exist. Do access it, the RPAGE has to contain 0xFE and the
    offset 0x1020 has to be used.

      ORG $7000
        MOVB #0xFE, 0x16 ; RPAGE
        LDAA 0x1020      ; reads at the logical address 0xFE1020

    Because the last two RAM pages are also accessible directly from 0x2000 to 0x3FFF, the
    following shorter code does read the same memory location:

      ORG $7000
        LDAA 0x2020      ; reads at the logical address 0x2020
                         ;   which maps to the same memory as 0xFE1020

    This memory location now also has a global address. For logical 0xFE1020 the global address is 0x0FE020.
    So the following code does once more access the same memory location:

      ORG $7000
        MOVB #0x0F, 0x10 ; GPAGE
        LDAA 0xE020      ; reads at the global address 0x0FE020
                         ;   which maps to the same memory as the logical addr. 0xFE1020

    Therefore every memory location for the HCS12X has up to 3 different addresses.
    Up to two logical and one global.
    Notes.
      - Not every address has a logical equivalent. The external space is only available in the global address space.
        The DMA Registers are also only addressable with global addresses.

      - The PPAGE can only be set if the code is outside of the 0x8000 to 0xBFFF range.
        If not, the next code fetch will be from the new wrong PPAGE value.

      - Inside of the paged area, the highest pages are allocated first. So all HCS12X's do have the FF pages
        (if they have this memory type at all).

      - For RPAGE, the value 0 is illegal. Otherwise the global addresses would overlap with the registers.
        This has the implication that the logical address 0x001000 is strictly seen not valid.


*/

#if __OPTION_ACTIVE__("-MapRAM")
#define __HCS12XE_RAMHM_SET__
#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一级免费观看| 在线观看视频一区二区欧美日韩| 亚洲午夜电影在线| 亚洲一级在线观看| 亚洲午夜一区二区三区| 亚洲国产日韩精品| 美女久久久精品| 国产一区久久久| 国产精品一二三区| 懂色av一区二区夜夜嗨| 9久草视频在线视频精品| 日本韩国欧美三级| 欧美日韩高清不卡| 日韩免费在线观看| 亚洲国产精品成人久久综合一区| 国产精品不卡在线| 亚洲成人av电影在线| 久热成人在线视频| 懂色av一区二区三区免费观看| jizz一区二区| 色综合久久综合网| 欧美成人福利视频| 综合激情网...| 日日夜夜精品视频免费| 久久99国产精品免费| 成人av影院在线| 精品视频一区二区不卡| 欧美大肚乱孕交hd孕妇| 亚洲欧洲韩国日本视频| 亚洲高清免费一级二级三级| 久久99精品一区二区三区| www.激情成人| 日韩欧美精品在线视频| 亚洲欧美在线另类| 老司机午夜精品99久久| 99久久综合国产精品| 日韩一级大片在线观看| 国产精品麻豆一区二区| 奇米777欧美一区二区| 97超碰欧美中文字幕| 精品久久久久久久久久久院品网 | 91在线精品一区二区三区| 欧美日本在线看| 国产精品久久久久桃色tv| 日韩精品色哟哟| 97精品国产露脸对白| 久久综合久久久久88| 亚洲综合在线五月| 99热在这里有精品免费| 精品免费一区二区三区| 亚洲成人免费视频| 91在线丨porny丨国产| 2019国产精品| 日本中文字幕一区二区有限公司| eeuss国产一区二区三区| 精品播放一区二区| 日韩电影在线免费| 欧美日韩aaa| 一区二区三区免费网站| 99亚偷拍自图区亚洲| 久久蜜桃av一区二区天堂| 日日摸夜夜添夜夜添亚洲女人| 色天天综合久久久久综合片| 中文字幕精品一区二区精品绿巨人 | 国产亚洲成年网址在线观看| 日本午夜一本久久久综合| 日本乱人伦一区| 亚洲私人黄色宅男| av福利精品导航| 国产精品久久久久久户外露出| 国产自产高清不卡| 久久久久99精品一区| 精彩视频一区二区| 久久亚洲精华国产精华液| 老司机精品视频一区二区三区| 在线成人小视频| 视频一区欧美精品| 91精品国产手机| 老汉av免费一区二区三区| 日韩视频不卡中文| 久久97超碰色| 精品国产乱码久久久久久夜甘婷婷| 亚洲风情在线资源站| 欧美日韩一区小说| 日本免费在线视频不卡一不卡二| 欧美一区二区三区色| 美女视频黄 久久| xnxx国产精品| 成人动漫在线一区| 亚洲精品成人在线| 91精品在线免费观看| 精品一区二区三区欧美| 国产欧美一区二区精品久导航| 成人国产一区二区三区精品| 亚洲天堂精品视频| 7777精品伊人久久久大香线蕉完整版 | 精品人伦一区二区色婷婷| 精品一区二区在线看| 久久免费视频一区| 色综合天天视频在线观看 | 亚洲成年人影院| xnxx国产精品| 99国产一区二区三精品乱码| 亚洲一区二区在线播放相泽| 日韩色视频在线观看| 不卡一区在线观看| 午夜免费久久看| 久久久国产综合精品女国产盗摄| av高清不卡在线| 蜜臀av在线播放一区二区三区| 2022国产精品视频| 91久久精品一区二区三区| 日韩国产一二三区| 国产精品剧情在线亚洲| 欧美日韩精品一区二区| 国产一区二区免费看| 亚洲成人av一区二区三区| 国产三级欧美三级日产三级99| 欧洲色大大久久| 国产精品一级片| 视频在线观看国产精品| 国产精品国产三级国产专播品爱网| 欧美精品自拍偷拍| 99re亚洲国产精品| 国产一区二区看久久| 亚洲国产中文字幕| 亚洲日本护士毛茸茸| 国产亚洲综合在线| 精品国产一区久久| 制服.丝袜.亚洲.另类.中文| 色婷婷久久久亚洲一区二区三区 | 国产精品国产三级国产三级人妇| 91精品国产综合久久福利 | 日韩av一级片| 亚洲人成在线播放网站岛国| 欧美激情综合五月色丁香| 欧美草草影院在线视频| 欧美三级欧美一级| 色婷婷久久久亚洲一区二区三区| 丁香另类激情小说| 国产一区二区福利| 精品一区二区三区久久久| 手机精品视频在线观看| 天天影视涩香欲综合网| 亚洲1区2区3区4区| 亚洲成人av电影在线| 亚洲一区二区五区| 亚洲va欧美va天堂v国产综合| 亚洲激情中文1区| 亚洲综合色网站| 亚洲国产视频a| 五月天久久比比资源色| 亚洲成人av一区二区| 污片在线观看一区二区| 青娱乐精品视频在线| 毛片av一区二区三区| 精品一区二区三区在线播放视频| 麻豆精品在线播放| 精品一区二区三区日韩| 国产成人综合亚洲网站| 国产ts人妖一区二区| 成人a区在线观看| 91视视频在线观看入口直接观看www| 成人动漫精品一区二区| 一本到一区二区三区| 欧美午夜电影网| 欧美成人乱码一区二区三区| 国产欧美一区二区三区在线老狼| 国产精品乱码一区二区三区软件| 亚洲欧洲精品天堂一级| 亚洲国产精品麻豆| 美女www一区二区| 国产一区二区成人久久免费影院 | ww久久中文字幕| 国产精品网站在线| 亚洲人成人一区二区在线观看 | 1区2区3区欧美| 日韩精品一二三区| 国产麻豆精品一区二区| av亚洲产国偷v产偷v自拍| 欧美久久婷婷综合色| 精品99一区二区三区| 亚洲欧美激情插| 开心九九激情九九欧美日韩精美视频电影| 国产精品白丝jk黑袜喷水| 欧美亚洲综合网| 亚洲精品一区二区精华| 中文字幕一区二区日韩精品绯色| 亚洲第一主播视频| 成人小视频免费观看| 欧美乱妇15p| 国产精品国模大尺度视频| 日韩不卡在线观看日韩不卡视频| 国产成人免费在线观看| 91精品国产美女浴室洗澡无遮挡| 欧美激情一区二区三区不卡 | 亚洲国产成人porn| 成人少妇影院yyyy| 欧美xfplay| 亚洲午夜影视影院在线观看|