为编程爱好者分享易语言教程源码的资源网

网站首页 > 易语言相关 > 易语言例程 正文

速度超级快的strlen汇编版

三叶资源网 2018-10-07 16:25:09 易语言例程 2542 ℃ 3 评论

源码是用置入代码来实现的。

@心冷、鱼儿

' mov eax,dword [ebp+08h]
' mov eax,dword [eax]
' cmp eax,0
' je exit
' push edx
' push edi
' lea edx,dword [eax+03h]

' label_b:
' mov edi,dword [eax]
' add eax,4
' lea ecx,dword [edi-01010101h]
' not edi
' and ecx,edi
' and ecx,80808080h
' jnz nxt

' mov edi,dword [eax]
' add eax,4
' lea ecx,dword [edi-01010101h]
' not edi
' and ecx,edi
' and ecx,80808080h
' jz label_b

' nxt:
' test ecx,00008080h
' jnz label_f
' shr ecx,16
' add eax,2

' label_f:
' shl cl,1
' sbb eax,edx
' pop edi
' pop edx
' exit:
' leave
' ret 04h


文件下载

来源:三叶资源网,欢迎分享,公众号:iisanye,(三叶资源网⑤群:21414575

已有3位网友发表了看法:

  • 重定义数组

    重定义数组  评论于 [2018-12-17 10:54:57]  回复

    mov edi, [eax] add eax, 4 lea ecx, [edi-1010101h] not edi and ecx, edi and e

欢迎 发表评论:

百度站内搜索
关注微信公众号
三叶资源网⑤群:三叶资源网⑤群

网站分类
随机tag
二维码识别2144多线程注册例程源码自绘旋转图片POST登录是否被修改图片裁剪队列按键精灵安卓版云的多文档窗口界面支持库机构游戏辅助外挂界面UITGP自动上号劲舞团属性框易语言聊天室源码xmlhttp动态加解密nodejs require快递查询
最新评论