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

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

?? memcpy.asm

?? C標準庫源代碼,能提高對C的理解,不錯的哦
?? ASM
?? 第 1 頁 / 共 2 頁
字號:
       page    ,132
        title   memcpy - Copy source memory bytes to destination
;***
;memcpy.asm - contains memcpy and memmove routines
;
;       Copyright (c) 1986-1997, Microsoft Corporation. All right reserved.
;
;Purpose:
;       memcpy() copies a source memory buffer to a destination buffer.
;       Overlapping buffers are not treated specially, so propogation may occur.
;       memmove() copies a source memory buffer to a destination buffer.
;       Overlapping buffers are treated specially, to avoid propogation.
;
;*******************************************************************************

        .xlist
        include cruntime.inc
        .list

M_EXIT  macro
        ret                     ; _cdecl return
        endm    ; M_EXIT

        CODESEG

page
;***
;memcpy - Copy source buffer to destination buffer
;
;Purpose:
;       memcpy() copies a source memory buffer to a destination memory buffer.
;       This routine does NOT recognize overlapping buffers, and thus can lead
;       to propogation.
;       For cases where propogation must be avoided, memmove() must be used.
;
;       Algorithm:
;
;       void * memcpy(void * dst, void * src, size_t count)
;       {
;               void * ret = dst;
;
;               /*
;                * copy from lower addresses to higher addresses
;                */
;               while (count--)
;                       *dst++ = *src++;
;
;               return(ret);
;       }
;
;memmove - Copy source buffer to destination buffer
;
;Purpose:
;       memmove() copies a source memory buffer to a destination memory buffer.
;       This routine recognize overlapping buffers to avoid propogation.
;       For cases where propogation is not a problem, memcpy() can be used.
;
;   Algorithm:
;
;       void * memmove(void * dst, void * src, size_t count)
;       {
;               void * ret = dst;
;
;               if (dst <= src || dst >= (src + count)) {
;                       /*
;                        * Non-Overlapping Buffers
;                        * copy from lower addresses to higher addresses
;                        */
;                       while (count--)
;                               *dst++ = *src++;
;                       }
;               else {
;                       /*
;                        * Overlapping Buffers
;                        * copy from higher addresses to lower addresses
;                        */
;                       dst += count - 1;
;                       src += count - 1;
;
;                       while (count--)
;                               *dst-- = *src--;
;                       }
;
;               return(ret);
;       }
;
;
;Entry:
;       void *dst = pointer to destination buffer
;       const void *src = pointer to source buffer
;       size_t count = number of bytes to copy
;
;Exit:
;       Returns a pointer to the destination buffer in AX/DX:AX
;
;Uses:
;       CX, DX
;
;Exceptions:
;*******************************************************************************

ifdef MEM_MOVE
        _MEM_     equ <memmove>
else  ; MEM_MOVE
        _MEM_     equ <memcpy>
endif  ; MEM_MOVE

%       public  _MEM_
_MEM_   proc \
        dst:ptr byte, \
        src:ptr byte, \
        count:IWORD

              ; destination pointer
              ; source pointer
              ; number of bytes to copy

;       push    ebp             ;U - save old frame pointer
;       mov     ebp, esp        ;V - set new frame pointer

        push    edi             ;U - save edi
        push    esi             ;V - save esi

        mov     esi,[src]       ;U - esi = source
        mov     ecx,[count]     ;V - ecx = number of bytes to move

        mov     edi,[dst]       ;U - edi = dest

;
; Check for overlapping buffers:
;       If (dst <= src) Or (dst >= src + Count) Then
;               Do normal (Upwards) Copy
;       Else
;               Do Downwards Copy to avoid propagation
;

        mov     eax,ecx         ;V - eax = byte count...

        mov     edx,ecx         ;U - edx = byte count...
        add     eax,esi         ;V - eax = point past source end

        cmp     edi,esi         ;U - dst <= src ?
        jbe     short CopyUp    ;V - yes, copy toward higher addresses

        cmp     edi,eax         ;U - dst < (src + count) ?
        jb      CopyDown        ;V - yes, copy toward lower addresses

;
; Copy toward higher addresses.
;
;
; The algorithm for forward moves is to align the destination to a dword
; boundary and so we can move dwords with an aligned destination.  This
; occurs in 3 steps.
;
;   - move x = ((4 - Dest & 3) & 3) bytes
;   - move y = ((L-x) >> 2) dwords
;   - move (L - x - y*4) bytes
;

CopyUp:
        test    edi,11b         ;U - destination dword aligned?
        jnz     short CopyLeadUp ;V - if we are not dword aligned already, align

        shr     ecx,2           ;U - shift down to dword count
        and     edx,11b         ;V - trailing byte count

        cmp     ecx,8           ;U - test if small enough for unwind copy
        jb      short CopyUnwindUp ;V - if so, then jump

        rep     movsd           ;N - move all of our dwords

        jmp     dword ptr TrailUpVec[edx*4] ;N - process trailing bytes

;
; Code to do optimal memory copies for non-dword-aligned destinations.
;

; The following length check is done for two reasons:
;
;    1. to ensure that the actual move length is greater than any possiale
;       alignment move, and
;
;    2. to skip the multiple move logic for small moves where it would
;       be faster to move the bytes with one instruction.
;

        align   @WordSize
CopyLeadUp:

        mov     eax,edi         ;U - get destination offset
        mov     edx,11b         ;V - prepare for mask

        sub     ecx,4           ;U - check for really short string - sub for adjust
        jb      short ByteCopyUp ;V - branch to just copy bytes

        and     eax,11b         ;U - get offset within first dword
        add     ecx,eax         ;V - update size after leading bytes copied

        jmp     dword ptr LeadUpVec[eax*4-4] ;N - process leading bytes

        align   @WordSize
ByteCopyUp:
        jmp     dword ptr TrailUpVec[ecx*4+16] ;N - process just bytes

        align   @WordSize
CopyUnwindUp:
        jmp     dword ptr UnwindUpVec[ecx*4] ;N - unwind dword copy

        align   @WordSize
LeadUpVec       dd      LeadUp1, LeadUp2, LeadUp3

        align   @WordSize
LeadUp1:
        and     edx,ecx         ;U - trailing byte count
        mov     al,[esi]        ;V - get first byte from source

        mov     [edi],al        ;U - write second byte to destination
        mov     al,[esi+1]      ;V - get second byte from source

        mov     [edi+1],al      ;U - write second byte to destination
        mov     al,[esi+2]      ;V - get third byte from source

        shr     ecx,2           ;U - shift down to dword count
        mov     [edi+2],al      ;V - write third byte to destination

        add     esi,3           ;U - advance source pointer
        add     edi,3           ;V - advance destination pointer

        cmp     ecx,8           ;U - test if small enough for unwind copy
        jb      short CopyUnwindUp ;V - if so, then jump

        rep     movsd           ;N - move all of our dwords

        jmp     dword ptr TrailUpVec[edx*4] ;N - process trailing bytes

        align   @WordSize
LeadUp2:
        and     edx,ecx         ;U - trailing byte count
        mov     al,[esi]        ;V - get first byte from source

        mov     [edi],al        ;U - write second byte to destination
        mov     al,[esi+1]      ;V - get second byte from source

        shr     ecx,2           ;U - shift down to dword count
        mov     [edi+1],al      ;V - write second byte to destination

        add     esi,2           ;U - advance source pointer
        add     edi,2           ;V - advance destination pointer

        cmp     ecx,8           ;U - test if small enough for unwind copy
        jb      short CopyUnwindUp ;V - if so, then jump

        rep     movsd           ;N - move all of our dwords

        jmp     dword ptr TrailUpVec[edx*4] ;N - process trailing bytes

        align   @WordSize
LeadUp3:
        and     edx,ecx         ;U - trailing byte count
        mov     al,[esi]        ;V - get first byte from source

        mov     [edi],al        ;U - write second byte to destination
        inc     esi             ;V - advance source pointer

        shr     ecx,2           ;U - shift down to dword count
        inc     edi             ;V - advance destination pointer

        cmp     ecx,8           ;U - test if small enough for unwind copy
        jb      short CopyUnwindUp ;V - if so, then jump

        rep     movsd           ;N - move all of our dwords

        jmp     dword ptr TrailUpVec[edx*4] ;N - process trailing bytes

        align   @WordSize
UnwindUpVec     dd      UnwindUp0, UnwindUp1, UnwindUp2, UnwindUp3
                dd      UnwindUp4, UnwindUp5, UnwindUp6, UnwindUp7

UnwindUp7:
        mov     eax,[esi+ecx*4-28] ;U - get dword from source
                                   ;V - spare
        mov     [edi+ecx*4-28],eax ;U - put dword into destination
UnwindUp6:
        mov     eax,[esi+ecx*4-24] ;U(entry)/V(not) - get dword from source
                                   ;V(entry) - spare
        mov     [edi+ecx*4-24],eax ;U - put dword into destination
UnwindUp5:
        mov     eax,[esi+ecx*4-20] ;U(entry)/V(not) - get dword from source
                                   ;V(entry) - spare
        mov     [edi+ecx*4-20],eax ;U - put dword into destination
UnwindUp4:
        mov     eax,[esi+ecx*4-16] ;U(entry)/V(not) - get dword from source
                                   ;V(entry) - spare

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲老司机在线| 91免费版在线看| 欧美成人一区二区三区在线观看| 偷拍与自拍一区| 在线不卡一区二区| 精品在线观看视频| 国产精品区一区二区三区| 91丝袜呻吟高潮美腿白嫩在线观看| 国产精品二区一区二区aⅴ污介绍| 91色在线porny| 丝袜脚交一区二区| 国产视频一区在线播放| 91小视频免费看| 婷婷中文字幕一区三区| 久久久久高清精品| 91美女精品福利| 亚洲bdsm女犯bdsm网站| 欧美videos大乳护士334| 懂色av一区二区三区蜜臀| 亚洲精品免费在线观看| 91精品国产综合久久精品性色| 国产又粗又猛又爽又黄91精品| 中文字幕视频一区| 4hu四虎永久在线影院成人| 国产精品亚洲成人| 亚洲一区二区三区美女| 精品动漫一区二区三区在线观看| 99re热这里只有精品视频| 免费成人你懂的| 中文字幕制服丝袜成人av | 粉嫩aⅴ一区二区三区四区| 一级做a爱片久久| 26uuu亚洲综合色| 日本精品裸体写真集在线观看| 麻豆精品新av中文字幕| 亚洲欧美日韩在线播放| 精品国产在天天线2019| 欧美性感一类影片在线播放| 国产成人综合在线播放| 亚洲成人在线免费| 日韩精品1区2区3区| 奇米在线7777在线精品 | 在线精品国精品国产尤物884a| 美腿丝袜一区二区三区| 一区二区在线观看免费视频播放| 欧美一级日韩免费不卡| 色一情一乱一乱一91av| 国产老妇另类xxxxx| 日日夜夜免费精品| 亚洲乱码国产乱码精品精可以看| 亚洲精品一区二区三区精华液| 欧洲国产伦久久久久久久| 粉嫩在线一区二区三区视频| 日韩不卡在线观看日韩不卡视频| 亚洲精品免费一二三区| 国产精品美女久久久久久久久久久| 欧美一区二区免费视频| 欧美优质美女网站| 波波电影院一区二区三区| 久久国产婷婷国产香蕉| 午夜伦理一区二区| 亚洲欧美一区二区不卡| 国产精品成人免费精品自在线观看| 精品福利在线导航| 欧美成人一级视频| 日韩欧美精品三级| 日韩精品中文字幕在线不卡尤物| 久久久久久麻豆| 欧美精品一区二区三区蜜桃| 日韩一级黄色片| 欧美一区二区精品久久911| 欧美日韩精品三区| 欧美精品18+| 91麻豆精品91久久久久同性| 69成人精品免费视频| 欧美日韩国产影片| 欧美日韩和欧美的一区二区| 欧美午夜影院一区| 欧美另类一区二区三区| 欧美日韩电影一区| 欧美日韩国产精品自在自线| 欧美日韩mp4| 欧美肥胖老妇做爰| 91精品国产欧美一区二区18| 日韩一区二区在线播放| 欧美精品一区二区三区视频| 欧美喷潮久久久xxxxx| 国产精品福利av| 国产视频一区二区在线| 国产精品狼人久久影院观看方式| 欧美激情资源网| 亚洲欧美偷拍卡通变态| 伊人婷婷欧美激情| 日本欧美一区二区三区乱码| 韩国成人精品a∨在线观看| 顶级嫩模精品视频在线看| aaa亚洲精品| 在线视频一区二区免费| 欧美一区二区三区视频免费| 精品国产电影一区二区| 国产精品高清亚洲| 亚洲成人精品在线观看| 久久精品噜噜噜成人av农村| 国产麻豆精品在线观看| 91丨九色丨蝌蚪富婆spa| 欧美色手机在线观看| 日韩精品一区二区三区中文不卡| 久久精品免视看| 怡红院av一区二区三区| 免费欧美在线视频| av一区二区三区四区| 欧美日韩午夜影院| 26uuu亚洲综合色欧美| 欧美日韩一区二区三区四区五区| 中文字幕一区二区5566日韩| 伊人色综合久久天天人手人婷| 亚洲大片在线观看| 国产一区视频在线看| 99久久er热在这里只有精品15| 欧美这里有精品| 久久精品综合网| 午夜久久电影网| 国产·精品毛片| 欧美浪妇xxxx高跟鞋交| 欧美极品少妇xxxxⅹ高跟鞋| 日韩国产高清在线| av在线一区二区三区| 欧美浪妇xxxx高跟鞋交| ...av二区三区久久精品| 久久精品国产一区二区| 色诱视频网站一区| 国产嫩草影院久久久久| 青草国产精品久久久久久| 色诱亚洲精品久久久久久| 久久先锋影音av鲁色资源| 亚洲福中文字幕伊人影院| 成人国产精品免费观看视频| 欧美xfplay| 青青草国产精品97视觉盛宴| 色狠狠一区二区三区香蕉| 日韩欧美亚洲国产精品字幕久久久| 成人久久视频在线观看| 欧美精选午夜久久久乱码6080| 中文在线一区二区| 国产毛片一区二区| 日韩欧美成人一区| 日本vs亚洲vs韩国一区三区二区 | 日本中文在线一区| 一本色道亚洲精品aⅴ| 欧美经典一区二区| 秋霞电影一区二区| 在线不卡免费欧美| 天天综合色天天| 欧美性生活大片视频| 亚洲精品亚洲人成人网在线播放| 成人免费看的视频| 中文在线资源观看网站视频免费不卡| 久久97超碰国产精品超碰| 日韩欧美中文字幕制服| 日韩国产高清在线| 欧美一区二区网站| 美女一区二区久久| 精品国产免费人成在线观看| 麻豆精品久久精品色综合| 久久国产精品露脸对白| 欧美色国产精品| 亚洲一区在线观看视频| 色婷婷久久综合| 亚洲精品高清在线| 91精品福利视频| 亚洲自拍另类综合| 欧美欧美欧美欧美| 蜜桃av一区二区在线观看| 欧美videos中文字幕| 国产成人精品午夜视频免费| 中文字幕av免费专区久久| 91社区在线播放| 亚洲无人区一区| 日韩欧美一二区| 国产一区二区三区四| 国产精品电影一区二区| 91久久精品网| 日韩国产成人精品| 久久毛片高清国产| 91在线精品一区二区三区| 亚洲一区二区三区在线| 日韩一区二区三区在线视频| 国产经典欧美精品| ...中文天堂在线一区| 欧美日韩免费观看一区二区三区| 亚洲www啪成人一区二区麻豆 | 久久婷婷成人综合色| 豆国产96在线|亚洲| 一区二区日韩电影| 日韩一区二区三区视频| 成人性生交大片免费看中文| 午夜视频在线观看一区二区| 在线看国产日韩| 日本亚洲三级在线| 久久久www成人免费无遮挡大片|