设为首页收藏本站淘宝杂货铺

从F到0 - From F to 0

 找回密码
 注册已关闭
搜索
查看: 1779|回复: 0
收起左侧

易语言MASM置入代码长整数型数组所有成员参与位与、位或、位异或运算(返回长整数型)

[复制链接]
发表于 2019-10-11 09:00:00 |阅读模式

  1. .版本 2

  2. .程序集 程序集1

  3. .子程序 _启动子程序, 整数型, , 请在本子程序中放置易模块初始化代码


  4. _临时子程序 ()  ' 在初始化代码执行完毕后调用测试代码
  5. 返回 (0)  ' 可以根据您的需要返回任意数值

  6. .子程序 _临时子程序

  7. ' 本名称子程序用作测试程序用,仅在开发及调试环境中有效,编译发布程序前将被系统自动清空,请将所有用作测试的临时代码放在本子程序中。 ***注意不要修改本子程序的名称、参数及返回值类型。
  8. 输出调试文本 (长整数型数组_位与 ({ 1.234567890123e+018, 1.298471298347e+015, -1234567890 }))
  9. 输出调试文本 (长整数型数组_位或 ({ 1.234567890123e+018, 1.298471298347e+015, -1234567890 }))
  10. 输出调试文本 (长整数型数组_位异或 ({ 1.234567890123e+018, 1.298471298347e+015, -1234567890 }))



  11. .子程序 长整数型数组_位与, 长整数型, 公开
  12. .参数 长整数型数组, 长整数型, 数组

  13. 置入代码 ({ 83, 81, 86, 87, 139, 69, 8, 51, 210, 11, 192, 117, 2, 235, 60, 139, 0, 11, 192, 117, 2, 235, 52, 139, 88, 4, 11, 219, 117, 4, 51, 192, 235, 41, 131, 192, 8, 51, 201, 51, 246, 51, 255, 247, 214, 247, 215, 235, 18, 35, 52, 200, 35, 124, 200, 4, 11, 246, 117, 6, 11, 255, 117, 2, 235, 5, 65, 59, 203, 114, 234, 139, 198, 139, 215, 95, 94, 89, 91, 201, 194, 4, 0 })
  14. ' push ebx
  15. ' push ecx
  16. ' push esi
  17. ' push edi
  18. ' mov eax,[ebp+8]
  19. ' xor edx,edx
  20. ' .if eax == 0
  21. ' jmp ASM_END
  22. ' .endif
  23. ' mov eax,[eax]
  24. ' .if eax == 0
  25. ' jmp ASM_END
  26. ' .endif
  27. ' mov ebx,[eax+4]
  28. ' .if ebx == 0
  29. ' xor eax,eax
  30. ' jmp ASM_END
  31. ' .endif
  32. ' add eax,8
  33. ' xor ecx,ecx
  34. ' xor esi,esi
  35. ' xor edi,edi
  36. ' not esi
  37. ' not edi
  38. ' .while ecx < ebx
  39. ' and esi,[eax+ecx*8]
  40. ' and edi,[eax+ecx*8+4]
  41. ' .if esi == 0 && edi == 0
  42. ' .break
  43. ' .endif
  44. ' inc ecx
  45. ' .endw
  46. ' mov eax,esi
  47. ' mov edx,edi
  48. ' ASM_END:
  49. ' pop edi
  50. ' pop esi
  51. ' pop ecx
  52. ' pop ebx
  53. ' leave
  54. ' retn 4

  55. 返回 (0)

  56. .子程序 长整数型数组_位或, 长整数型, 公开
  57. .参数 长整数型数组, 长整数型, 数组

  58. 置入代码 ({ 83, 81, 86, 87, 139, 69, 8, 51, 210, 11, 192, 117, 2, 235, 58, 139, 0, 11, 192, 117, 2, 235, 50, 139, 88, 4, 11, 219, 117, 4, 51, 192, 235, 39, 131, 192, 8, 51, 201, 51, 246, 51, 255, 235, 20, 11, 52, 200, 11, 124, 200, 4, 131, 254, 255, 117, 7, 131, 255, 255, 117, 2, 235, 5, 65, 59, 203, 114, 232, 139, 198, 139, 215, 95, 94, 89, 91, 201, 194, 4, 0 })
  59. ' push ebx
  60. ' push ecx
  61. ' push esi
  62. ' push edi
  63. ' mov eax,[ebp+8]
  64. ' xor edx,edx
  65. ' .if eax == 0
  66. ' jmp ASM_END
  67. ' .endif
  68. ' mov eax,[eax]
  69. ' .if eax == 0
  70. ' jmp ASM_END
  71. ' .endif
  72. ' mov ebx,[eax+4]
  73. ' .if ebx == 0
  74. ' xor eax,eax
  75. ' jmp ASM_END
  76. ' .endif
  77. ' add eax,8
  78. ' xor ecx,ecx
  79. ' xor esi,esi
  80. ' xor edi,edi
  81. ' .while ecx < ebx
  82. ' or esi,[eax+ecx*8]
  83. ' or edi,[eax+ecx*8+4]
  84. ' .if esi == -1 && edi == -1
  85. ' .break
  86. ' .endif
  87. ' inc ecx
  88. ' .endw
  89. ' mov eax,esi
  90. ' mov edx,edi
  91. ' ASM_END:
  92. ' pop edi
  93. ' pop esi
  94. ' pop ecx
  95. ' pop ebx
  96. ' leave
  97. ' retn 4

  98. 返回 (0)

  99. .子程序 长整数型数组_位异或, 长整数型, 公开
  100. .参数 长整数型数组, 长整数型, 数组

  101. 置入代码 ({ 83, 81, 86, 87, 139, 69, 8, 51, 210, 11, 192, 117, 2, 235, 46, 139, 0, 11, 192, 117, 2, 235, 38, 139, 88, 4, 11, 219, 117, 4, 51, 192, 235, 27, 131, 192, 8, 51, 201, 51, 246, 51, 255, 235, 8, 51, 52, 200, 51, 124, 200, 4, 65, 59, 203, 114, 244, 139, 198, 139, 215, 95, 94, 89, 91, 201, 194, 4, 0 })
  102. ' push ebx
  103. ' push ecx
  104. ' push esi
  105. ' push edi
  106. ' mov eax,[ebp+8]
  107. ' xor edx,edx
  108. ' .if eax == 0
  109. ' jmp ASM_END
  110. ' .endif
  111. ' mov eax,[eax]
  112. ' .if eax == 0
  113. ' jmp ASM_END
  114. ' .endif
  115. ' mov ebx,[eax+4]
  116. ' .if ebx == 0
  117. ' xor eax,eax
  118. ' jmp ASM_END
  119. ' .endif
  120. ' add eax,8
  121. ' xor ecx,ecx
  122. ' xor esi,esi
  123. ' xor edi,edi
  124. ' .while ecx < ebx
  125. ' xor esi,[eax+ecx*8]
  126. ' xor edi,[eax+ecx*8+4]
  127. ' inc ecx
  128. ' .endw
  129. ' mov eax,esi
  130. ' mov edx,edi
  131. ' ASM_END:
  132. ' pop edi
  133. ' pop esi
  134. ' pop ecx
  135. ' pop ebx
  136. ' leave
  137. ' retn 4

  138. 返回 (0)
复制代码

相关帖子

您需要登录后才可以回帖 登录 | 注册已关闭

本版积分规则

QQ|手机版|Archiver|从F到0 ( 蒙ICP备17002595号-1 )
蒙公网安备15010402000325号

腾讯云安全认证

GMT+8, 2024-4-20 08:31 , Processed in 0.586034 second(s), 20 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表