|
- .版本 2
- .程序集 程序集1
- .子程序 _启动子程序, 整数型, , 请在本子程序中放置易模块初始化代码
- _临时子程序 () ' 在初始化代码执行完毕后调用测试代码
- 返回 (0) ' 可以根据您的需要返回任意数值
- .子程序 _临时子程序
- .局部变量 A, 整数型, , "0"
- A = { 1, 2, 3, 4, 5 }
- 信息框 (整数型数组_寻找大于值 (A, 4), 0, , ) ' 数组中存在大于4的值,返回真
- A = { 1, 2, 3, 4, 5, -1, -2, -3, -4, -5 }
- 信息框 (整数型数组_寻找小于值 (A, -10), 0, , ) ' 数组中不存在小于-10的值,返回假
- A = { 1, 2, 3, 4, 5, -1, -2, -3, -4, -5 }
- 信息框 (整数型数组_寻找 (A, -1), 0, , ) ' 数组中存在-1,返回真
- .子程序 整数型数组_寻找大于值, 逻辑型, 公开, 数组中存在大于数值的成员,返回真,否则返回假,空数组返回假
- .参数 数组, 整数型, 数组
- .参数 数值, 整数型
- 置入代码 ({ 83, 81, 82, 139, 69, 8, 11, 192, 117, 2, 235, 48, 139, 0, 11, 192, 117, 2, 235, 40, 139, 88, 4, 11, 219, 117, 4, 51, 192, 235, 29, 131, 192, 8, 139, 85, 12, 51, 201, 235, 13, 57, 20, 136, 126, 7, 184, 1, 0, 0, 0, 235, 7, 65, 59, 203, 114, 239, 51, 192, 90, 89, 91, 201, 194, 8, 0 })
- ' push ebx
- ' push ecx
- ' push edx
- ' mov eax,[ebp+8]
- ' .if !eax
- ' jmp ASM_END
- ' .endif
- ' mov eax,[eax]
- ' .if !eax
- ' jmp ASM_END
- ' .endif
- ' mov ebx,[eax+4]
- ' .if !ebx
- ' xor eax,eax
- ' jmp ASM_END
- ' .endif
- ' add eax,8
- ' mov edx,[ebp+12]
- ' xor ecx,ecx
- ' .while ecx < ebx
- ' .if sdword ptr [eax+ecx*4] > edx
- ' mov eax,1
- ' jmp ASM_END
- ' .endif
- ' inc ecx
- ' .endw
- ' xor eax,eax
- ' ASM_END:
- ' pop edx
- ' pop ecx
- ' pop ebx
- ' leave
- ' retn 8
- 返回 (假)
- .子程序 整数型数组_寻找小于值, 逻辑型, 公开, 数组中存在小于数值的成员,返回真,否则返回假,空数组返回假
- .参数 数组, 整数型, 数组
- .参数 数值, 整数型
- 置入代码 ({ 83, 81, 82, 139, 69, 8, 11, 192, 117, 2, 235, 48, 139, 0, 11, 192, 117, 2, 235, 40, 139, 88, 4, 11, 219, 117, 4, 51, 192, 235, 29, 131, 192, 8, 139, 85, 12, 51, 201, 235, 13, 57, 20, 136, 125, 7, 184, 1, 0, 0, 0, 235, 7, 65, 59, 203, 114, 239, 51, 192, 90, 89, 91, 201, 194, 8, 0 })
- ' push ebx
- ' push ecx
- ' push edx
- ' mov eax,[ebp+8]
- ' .if !eax
- ' jmp ASM_END
- ' .endif
- ' mov eax,[eax]
- ' .if !eax
- ' jmp ASM_END
- ' .endif
- ' mov ebx,[eax+4]
- ' .if !ebx
- ' xor eax,eax
- ' jmp ASM_END
- ' .endif
- ' add eax,8
- ' mov edx,[ebp+12]
- ' xor ecx,ecx
- ' .while ecx < ebx
- ' .if sdword ptr [eax+ecx*4] < edx
- ' mov eax,1
- ' jmp ASM_END
- ' .endif
- ' inc ecx
- ' .endw
- ' xor eax,eax
- ' ASM_END:
- ' pop edx
- ' pop ecx
- ' pop ebx
- ' leave
- ' retn 8
- 返回 (假)
- .子程序 整数型数组_寻找, 逻辑型, 公开, 数组中存在指定成员,返回真,否则返回假,空数组返回假
- .参数 数组, 整数型, 数组
- .参数 数值, 整数型
- 置入代码 ({ 83, 81, 82, 139, 69, 8, 11, 192, 117, 2, 235, 48, 139, 0, 11, 192, 117, 2, 235, 40, 139, 88, 4, 11, 219, 117, 4, 51, 192, 235, 29, 131, 192, 8, 139, 85, 12, 51, 201, 235, 13, 57, 20, 136, 117, 7, 184, 1, 0, 0, 0, 235, 7, 65, 59, 203, 114, 239, 51, 192, 90, 89, 91, 201, 194, 8, 0 })
- ' push ebx
- ' push ecx
- ' push edx
- ' mov eax,[ebp+8]
- ' .if !eax
- ' jmp ASM_END
- ' .endif
- ' mov eax,[eax]
- ' .if !eax
- ' jmp ASM_END
- ' .endif
- ' mov ebx,[eax+4]
- ' .if !ebx
- ' xor eax,eax
- ' jmp ASM_END
- ' .endif
- ' add eax,8
- ' mov edx,[ebp+12]
- ' xor ecx,ecx
- ' .while ecx < ebx
- ' .if [eax+ecx*4] == edx
- ' mov eax,1
- ' jmp ASM_END
- ' .endif
- ' inc ecx
- ' .endw
- ' xor eax,eax
- ' ASM_END:
- ' pop edx
- ' pop ecx
- ' pop ebx
- ' leave
- ' retn 8
- 返回 (假)
复制代码
|
|