- 1、本文档共15页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Delphi汇编学习(三篇)(国外英文资料)
Delphi汇编学习(三篇)(国外英文资料)The red rain falls on the waves, and the green hills become Bridges. The drunk sand field jun mo smile, ancient to fight a few people to return! The auxiliary car, the lips and the dead. A gentlemans hand is as sweet as water. If the skin doesnt survive, its a bad thing. aUsing assembly exceptions in Delphi is simple, using only the keyword asm... End to boot. Get a character in the string where there are a lot of ways, the easiest is to use the Delphi another method is to use your own Pos function loop through an array of strings, the method of dichotomy, and so on, these is the conventional method, which suggested that had better not use Pos function. Because, although the use of the function code is very simple, only one sentence CharIndex: = Pos (MyChar, STR) will be able to complete, but actually hes efficiency is the lowest, because Delphi before using it, to create an array space first, then put the length of 1 and then copy in the single character to just open the memory space. The Pos function is then called to find, and after the lookup, Delphi will use Try... Finally... The End mechanism frees up the allocated memory space, and Try finally is a resource-consuming resource. So its not recommended. The method of sequential loop lookup is also simple, and the dichotomy is a little more complicated.The following was written by myself a position function: (of a character in the string is sequential search, are interested can be modified to become a binary search, the search speed will become a log by orders of magnitude)Stop discussing how to use assembly in Delphi!Function GetCharPos (ResChar: AnsiChar; Const s: string; Index: integer = 0) : integer;asmThe / / Test instruction is the and and operation, the only difference is that the value in the Edx does not changeThe Test edx, edx; / / to determine if Edx is 0 and if 0 is nilJz @exit / / if empty, the jump exitsMov Edi, Ecx; / / saving the value of Index, where is it going to start/ /
您可能关注的文档
- 1、限幅滤波法(又称程序判断滤波法)(国外英文资料).doc
- 1-02、试简述分组交换的要点。(国外英文资料).doc
- 2001年1月自考互联网及其应用试题(国外英文资料).doc
- 1.3外存储器(国外英文资料).doc
- 2005年全国计算机等级考试二级C语言真题(国外英文资料).doc
- 2009年全国自考工业用微型计算机模拟试卷(国外英文资料).doc
- 2010年3月全国计算机二级C语言笔试真题及答案(word版)(国外英文资料).doc
- 2010年3月计算机等考二级C语言笔试试题 附答案(国外英文资料).doc
- 2010单片机习题汇总(国外英文资料).doc
- 2010年下 下午考试(国外英文资料).doc
文档评论(0)