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

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

?? strncpy.asm

?? C標準庫源代碼,能提高對C的理解,不錯的哦
?? ASM
字號:
        page    ,132
        title   strncpy - copy at most n characters of string
;***
;strncpy.asm - copy at most n characters of string
;
;       Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.
;
;Purpose:
;       defines strncpy() - copy at most n characters of string
;
;*******************************************************************************

        .xlist
        include cruntime.inc
        .list

page
;***
;char *strncpy(dest, source, count) - copy at most n characters
;
;Purpose:
;       Copies count characters from the source string to the
;       destination.  If count is less than the length of source,
;       NO NULL CHARACTER is put onto the end of the copied string.
;       If count is greater than the length of sources, dest is padded
;       with null characters to length count.
;
;       Algorithm:
;       char *
;       strncpy (dest, source, count)
;       char *dest, *source;
;       unsigned count;
;       {
;         char *start = dest;
;
;         while (count && (*dest++ = *source++))
;             count--;
;         if (count)
;             while (--count)
;                 *dest++ = '\0';
;         return(start);
;       }
;
;Entry:
;       char *dest     - pointer to spot to copy source, enough space
;                        is assumed.
;       char *source   - source string for copy
;       unsigned count - characters to copy
;
;Exit:
;       returns dest, with the character copied there.
;
;Uses:
;
;Exceptions:
;
;*******************************************************************************

        CODESEG

        public  strncpy
strncpy proc

        .FPO    ( 0, 3, 0, 0, 0, 0 )

        mov     ecx,[esp + 0ch]     ; ecx = count
        push    edi                 ; preserve edi
        test    ecx,ecx
        jz      short finish        ; leave if count is zero

        push    esi                 ; preserve edi
        push    ebx                 ; preserve ebx
        mov     ebx,ecx             ; store count for tail loop
        mov     esi,[esp + 14h]     ; esi -> source string
        test    esi,3               ; test if source string is aligned on 32 bits
        mov     edi,[esp + 10h]     ; edi -> dest string
        jnz     short src_misaligned    ; (almost always source is aligned)

        shr     ecx,2               ; convert ecx to dword count
        jnz     short main_loop_entrance
        jmp     short copy_tail_loop    ; 0 < count < 4

; simple byte loop until string is aligned

src_misaligned:
        mov     al,byte ptr [esi]   ; copy a byte from source to dest
        inc     esi
        mov     [edi],al
        inc     edi
        dec     ecx
        jz      fill_tail_end1      ; if count == 0, leave
        test    al,al               ; was last copied byte zero?
        jz      short align_dest    ; if so, go align dest and pad it out
                                    ; with zeros
        test    esi,3               ; esi already aligned ?
        jne     short src_misaligned
        mov     ebx,ecx             ; store count for tail loop
        shr     ecx,2
        jnz     short main_loop_entrance

tail_loop_start:
        and     ebx,3               ; ebx = count_before_main_loop%4
        jz      short fill_tail_end1    ; if ebx == 0 then leave without
                                        ; appending a null byte

; while ( EOS (end-of-string) not found and count > 0 ) copy bytes

copy_tail_loop:
        mov     al,byte ptr [esi]   ; load byte from source
        inc     esi
        mov     [edi],al            ; store byte to dest
        inc     edi
        test    al,al               ; EOS found?
        je      short fill_tail_zero_bytes  ; '\0' was already copied
        dec     ebx
        jnz     copy_tail_loop
fill_tail_end1:
        mov     eax,[esp + 10h]     ; prepare return value
        pop     ebx
        pop     esi
        pop     edi
        ret

; EOS found. Pad with null characters to length count

align_dest:
        test    edi,3               ; dest string aligned?
        jz      dest_align_loop_end
dest_align_loop:
        mov     [edi],al
        inc     edi
        dec     ecx                 ; count == 0?
        jz      fill_tail_end       ; if so, finished
        test    edi,3               ; is edi aligned ?
        jnz     dest_align_loop
dest_align_loop_end:
        mov     ebx,ecx             ; ebx > 0
        shr     ecx,2               ; convert ecx to count of dwords
        jnz     fill_dwords_with_EOS
        ; pad tail bytes
finish_loop:                        ; 0 < ebx < 4
        mov     [edi],al
        inc     edi
fill_tail_zero_bytes:
        dec     ebx
        jnz     finish_loop
        pop     ebx
        pop     esi
finish:
        mov     eax,[esp + 8]       ; return in eax pointer to dest string
        pop     edi
        ret

; copy (source) string to (dest). Also look for end of (source) string

main_loop:                          ; edx contains first dword of source string
        mov     [edi],edx           ; store one more dword
        add     edi,4               ; kick dest pointer
        dec     ecx
        jz      tail_loop_start

main_loop_entrance:
        mov     edx,7efefeffh
        mov     eax,dword ptr [esi] ; read 4 bytes (dword)
        add     edx,eax
        xor     eax,-1
        xor     eax,edx
        mov     edx,[esi]           ; it's in cache now
        add     esi,4               ; kick dest pointer
        test    eax,81010100h
        je      short main_loop

        ; may have found zero byte in the dword

        test    dl,dl               ; is it byte 0
        je      short byte_0
        test    dh,dh               ; is it byte 1
        je      short byte_1
        test    edx,00ff0000h       ; is it byte 2
        je      short byte_2
        test    edx,0ff000000h      ; is it byte 3
        jne     short main_loop     ; taken if bits 24-30 are clear and bit
                                    ; 31 is set

; a null character was found, so dest needs to be padded out with null chars
; to count length.

        mov     [edi],edx
        jmp     short fill_with_EOS_dwords

byte_2:
        and     edx,0ffffh          ; fill high 2 bytes with 0
        mov     [edi],edx
        jmp     short fill_with_EOS_dwords

byte_1:
        and     edx,0ffh            ; fill high 3 bytes with 0
        mov     [edi],edx
        jmp     short fill_with_EOS_dwords

byte_0:
        xor     edx,edx             ; fill whole dword with 0
        mov     [edi],edx

; End of string was found. Pad out dest string with dwords of 0

fill_with_EOS_dwords:               ; ecx > 0   (ecx is dword counter)
        add     edi,4
        xor     eax,eax             ; it is instead of ???????????????????
        dec     ecx
        jz      fill_tail           ; we filled all dwords

fill_dwords_with_EOS:
        xor     eax,eax
fill_with_EOS_loop:
        mov     [edi],eax
        add     edi,4
        dec     ecx
        jnz     short fill_with_EOS_loop
fill_tail:                          ; let's pad tail bytes with zero
        and     ebx,3               ; ebx = ebx % 4
        jnz     short finish_loop   ; taken, when there are some tail bytes
fill_tail_end:
        mov     eax,[esp + 10h]
        pop     ebx
        pop     esi
        pop     edi
        ret

strncpy endp
        end



?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜精品久久久久久久| 一区二区三区精品视频| 这里只有精品免费| 欧美日韩综合色| 在线观看国产一区二区| 在线免费不卡电影| 欧美三级在线视频| 91麻豆精品国产自产在线 | 91在线播放网址| 成人app下载| 91福利在线播放| 欧美亚洲综合另类| 91精品在线免费| 欧美刺激午夜性久久久久久久| 欧美一级高清大全免费观看| 日韩精品一区二区三区swag| 国产亚洲福利社区一区| 国产精品久久久久久户外露出| 1024精品合集| 亚洲精品伦理在线| 午夜欧美2019年伦理| 日本麻豆一区二区三区视频| 激情亚洲综合在线| 成人毛片老司机大片| 日本高清不卡一区| 日本一区二区免费在线| 日韩伦理免费电影| 亚洲一区二区三区四区五区黄| 日韩精品欧美精品| 国产精品一区不卡| 在线看不卡av| 久久久久久久久久久电影| 亚洲自拍偷拍九九九| 精品一区二区久久| 日本福利一区二区| 久久青草欧美一区二区三区| 亚洲精品综合在线| 国内偷窥港台综合视频在线播放| av不卡一区二区三区| 日韩一区二区三区四区| 椎名由奈av一区二区三区| 日本不卡免费在线视频| 色综合久久中文字幕综合网| 日韩视频免费观看高清完整版 | 麻豆国产一区二区| 99久久久精品免费观看国产蜜| 欧美高清性hdvideosex| 国产精品污污网站在线观看| 日韩高清不卡一区二区| 高清不卡一区二区| 欧美mv日韩mv国产网站| 亚洲主播在线播放| 97成人超碰视| 久久久久9999亚洲精品| 日韩中文字幕麻豆| 色综合一区二区三区| 26uuu欧美日本| 日本一不卡视频| 欧美天堂亚洲电影院在线播放| 国产亚洲欧美一区在线观看| 免费观看成人av| 欧美日韩精品一区二区在线播放| 亚洲图片你懂的| 成人爱爱电影网址| 国产婷婷精品av在线| 国产曰批免费观看久久久| 欧美一区二区日韩| 青青青伊人色综合久久| 欧美体内she精高潮| 一区二区三区丝袜| 9久草视频在线视频精品| 欧美激情一区三区| 国产经典欧美精品| 国产精品情趣视频| 成人天堂资源www在线| 国产欧美视频一区二区| 国产99精品在线观看| 国产欧美日韩另类一区| 国产suv精品一区二区6| 国产精品狼人久久影院观看方式| 国产成人精品免费在线| 国产精品久久久久久户外露出 | 日本伊人精品一区二区三区观看方式| 欧洲精品中文字幕| 亚洲福利一二三区| 欧美日韩一级片网站| 免费高清在线视频一区·| 日韩亚洲欧美中文三级| jvid福利写真一区二区三区| 亚洲视频你懂的| 在线观看亚洲一区| 日日摸夜夜添夜夜添亚洲女人| 日韩一区二区精品在线观看| 精品一区免费av| 国产偷国产偷精品高清尤物| 91在线小视频| 亚洲1区2区3区4区| 亚洲精品在线免费播放| 99久免费精品视频在线观看| 亚洲自拍与偷拍| 日韩精品一区二区三区老鸭窝| 国产一区二区福利视频| 中文字幕一区二区在线观看| 欧美在线不卡视频| 精品亚洲成a人| 综合婷婷亚洲小说| 欧美一区二视频| 成人小视频免费观看| 亚洲一区二区三区四区五区黄| 精品久久一区二区| 在线免费亚洲电影| 精品综合久久久久久8888| 亚洲欧美日韩国产一区二区三区| 欧美一区二区国产| av在线综合网| 久久黄色级2电影| 亚洲少妇最新在线视频| 精品国一区二区三区| 欧美三级一区二区| 99久久er热在这里只有精品66| 美日韩一区二区三区| 中文字幕日韩一区二区| 欧美不卡激情三级在线观看| 91欧美一区二区| 国产凹凸在线观看一区二区| 亚洲一区二区三区小说| 国产精品久久久久影院色老大| 91精品国产品国语在线不卡| 一本色道亚洲精品aⅴ| 国产福利精品一区二区| 日韩不卡免费视频| 亚洲mv在线观看| 亚洲激情av在线| 中文字幕精品综合| 久久久久久日产精品| 日韩一区二区三区高清免费看看 | 日韩国产高清在线| 亚洲你懂的在线视频| 国产精品成人一区二区艾草 | 最新国产精品久久精品| 欧美tk—视频vk| 欧美精品丝袜久久久中文字幕| 国产成人av一区二区三区在线| 日韩一区精品字幕| 亚洲五月六月丁香激情| 日韩毛片高清在线播放| 亚洲欧洲av另类| 国产三级精品三级在线专区| 久久综合成人精品亚洲另类欧美| 8x福利精品第一导航| 欧美三级在线播放| 在线播放亚洲一区| 欧美色倩网站大全免费| 欧美日韩高清影院| 91精品国产福利在线观看| 欧美色视频在线| 欧美精品亚洲二区| 欧美一区三区二区| 欧美不卡一区二区三区| 精品久久免费看| 欧美精品一区二区三区高清aⅴ| 亚洲精品一区二区三区香蕉| 精品国产1区二区| 国产性天天综合网| 亚洲欧美综合另类在线卡通| 亚洲毛片av在线| 亚洲国产你懂的| 日日夜夜精品免费视频| 久久狠狠亚洲综合| 丁香婷婷综合激情五月色| www.av亚洲| 欧美日韩精品三区| 日韩欧美美女一区二区三区| 2020日本不卡一区二区视频| 欧美精品一区二区蜜臀亚洲| 国产精品免费久久| 夜夜夜精品看看| 麻豆视频观看网址久久| 国产99精品国产| 欧美视频一区二区在线观看| 欧美成人女星排名| 国产精品美女视频| 午夜精品成人在线| 成人免费视频一区| 欧美视频一区二区三区四区 | 日韩欧美中文字幕精品| 国产日韩欧美激情| 性感美女久久精品| 国产成人综合视频| 91成人在线精品| 久久嫩草精品久久久精品| 亚洲日本中文字幕区| 另类综合日韩欧美亚洲| 91丨porny丨最新| 欧美群妇大交群的观看方式| 亚洲国产日韩一级| 国产精品一线二线三线| 欧美无砖砖区免费| 国产精品视频观看| 久久激情综合网|