|
- .版本 2
- .支持库 spec
- .程序集 程序集1
- .子程序 _启动子程序, 整数型, , 请在本子程序中放置易模块初始化代码
- _临时子程序 () ' 在初始化代码执行完毕后调用测试代码
- 返回 (0) ' 可以根据您的需要返回任意数值
- .子程序 _临时子程序
- .局部变量 A, 长整数型, , "0"
- .局部变量 B, 日期时间型, , "0"
- .局部变量 C, 双精度小数型, , "0"
- A = { 1, 2, 3, 4, 5 }
- B = { [2020年1月1日], [2022年12月21日], [2032年1月6日], [2020年1月1日], [2032年1月6日] }
- 长整数型数组_交换数值 (A, 1, 2)
- 调试输出 (A)
- 日期时间型数组_交换数值 (B, [2032年1月6日], [2020年1月1日])
- 调试输出 (B)
- C = { 3.14, 3.14, 4.13, 123 }
- 双精度小数型数组_交换数值 (C, 3.14, 4.13)
- 调试输出 (C)
- .子程序 长整数型数组_交换数值, , 公开, 被交换值=1 交换值=2 检测到2则写入1,检测到1则写入2,不能相同否则不转换
- .参数 数组, 长整数型, 数组
- .参数 被交换值, 长整数型
- .参数 交换值, 长整数型
- 置入代码 ({ 80, 83, 81, 86, 87, 139, 69, 12, 139, 93, 16, 59, 69, 20, 117, 7, 59, 93, 24, 117, 2, 235, 93, 139, 69, 8, 11, 192, 117, 2, 235, 84, 139, 0, 11, 192, 117, 2, 235, 76, 139, 88, 4, 11, 219, 117, 2, 235, 67, 131, 192, 8, 51, 201, 235, 56, 139, 52, 200, 139, 124, 200, 4, 59, 117, 12, 117, 20, 59, 125, 16, 117, 15, 139, 117, 20, 139, 125, 24, 137, 52, 200, 137, 124, 200, 4, 235, 23, 59, 117, 20, 117, 18, 59, 125, 24, 117, 13, 139, 117, 12, 139, 125, 16, 137, 52, 200, 137, 124, 200, 4, 65, 59, 203, 114, 196, 95, 94, 89, 91, 88 })
- ' push eax
- ' push ebx
- ' push ecx
- ' push esi
- ' push edi
- ' mov eax,[ebp+12]
- ' mov ebx,[ebp+16]
- ' .if eax == [ebp+20] && ebx == [ebp+24]
- ' jmp ASM_END
- ' .endif
- ' 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
- ' jmp ASM_END
- ' .endif
- ' add eax,8
- ' xor ecx,ecx
- ' .while ecx < ebx
- ' mov esi,[ecx*8+eax]
- ' mov edi,[ecx*8+eax+4]
- ' .if esi == [ebp+12] && edi == [ebp+16]
- ' mov esi,[ebp+20]
- ' mov edi,[ebp+24]
- ' mov [ecx*8+eax],esi
- ' mov [ecx*8+eax+4],edi
- ' .elseif esi == [ebp+20] && edi == [ebp+24]
- ' mov esi,[ebp+12]
- ' mov edi,[ebp+16]
- ' mov [ecx*8+eax],esi
- ' mov [ecx*8+eax+4],edi
- ' .endif
- ' inc ecx
- ' .endw
- ' ASM_END:
- ' pop edi
- ' pop esi
- ' pop ecx
- ' pop ebx
- ' pop eax
- .子程序 日期时间型数组_交换数值, , 公开, 代码与 长整数型数组_交换数值() 相同
- .参数 数组, 日期时间型, 数组
- .参数 被交换值, 日期时间型
- .参数 交换值, 日期时间型
- 置入代码 ({ 80, 83, 81, 86, 87, 139, 69, 12, 139, 93, 16, 59, 69, 20, 117, 7, 59, 93, 24, 117, 2, 235, 93, 139, 69, 8, 11, 192, 117, 2, 235, 84, 139, 0, 11, 192, 117, 2, 235, 76, 139, 88, 4, 11, 219, 117, 2, 235, 67, 131, 192, 8, 51, 201, 235, 56, 139, 52, 200, 139, 124, 200, 4, 59, 117, 12, 117, 20, 59, 125, 16, 117, 15, 139, 117, 20, 139, 125, 24, 137, 52, 200, 137, 124, 200, 4, 235, 23, 59, 117, 20, 117, 18, 59, 125, 24, 117, 13, 139, 117, 12, 139, 125, 16, 137, 52, 200, 137, 124, 200, 4, 65, 59, 203, 114, 196, 95, 94, 89, 91, 88 })
- ' push eax
- ' push ebx
- ' push ecx
- ' push esi
- ' push edi
- ' mov eax,[ebp+12]
- ' mov ebx,[ebp+16]
- ' .if eax == [ebp+20] && ebx == [ebp+24]
- ' jmp ASM_END
- ' .endif
- ' 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
- ' jmp ASM_END
- ' .endif
- ' add eax,8
- ' xor ecx,ecx
- ' .while ecx < ebx
- ' mov esi,[ecx*8+eax]
- ' mov edi,[ecx*8+eax+4]
- ' .if esi == [ebp+12] && edi == [ebp+16]
- ' mov esi,[ebp+20]
- ' mov edi,[ebp+24]
- ' mov [ecx*8+eax],esi
- ' mov [ecx*8+eax+4],edi
- ' .elseif esi == [ebp+20] && edi == [ebp+24]
- ' mov esi,[ebp+12]
- ' mov edi,[ebp+16]
- ' mov [ecx*8+eax],esi
- ' mov [ecx*8+eax+4],edi
- ' .endif
- ' inc ecx
- ' .endw
- ' ASM_END:
- ' pop edi
- ' pop esi
- ' pop ecx
- ' pop ebx
- ' pop eax
- .子程序 双精度小数型数组_交换数值, , 公开, 代码与 长整数型数组_交换数值() 相同
- .参数 数组, 双精度小数型, 数组
- .参数 被交换值, 双精度小数型
- .参数 交换值, 双精度小数型
- 置入代码 ({ 80, 83, 81, 86, 87, 139, 69, 12, 139, 93, 16, 59, 69, 20, 117, 7, 59, 93, 24, 117, 2, 235, 93, 139, 69, 8, 11, 192, 117, 2, 235, 84, 139, 0, 11, 192, 117, 2, 235, 76, 139, 88, 4, 11, 219, 117, 2, 235, 67, 131, 192, 8, 51, 201, 235, 56, 139, 52, 200, 139, 124, 200, 4, 59, 117, 12, 117, 20, 59, 125, 16, 117, 15, 139, 117, 20, 139, 125, 24, 137, 52, 200, 137, 124, 200, 4, 235, 23, 59, 117, 20, 117, 18, 59, 125, 24, 117, 13, 139, 117, 12, 139, 125, 16, 137, 52, 200, 137, 124, 200, 4, 65, 59, 203, 114, 196, 95, 94, 89, 91, 88 })
- ' push eax
- ' push ebx
- ' push ecx
- ' push esi
- ' push edi
- ' mov eax,[ebp+12]
- ' mov ebx,[ebp+16]
- ' .if eax == [ebp+20] && ebx == [ebp+24]
- ' jmp ASM_END
- ' .endif
- ' 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
- ' jmp ASM_END
- ' .endif
- ' add eax,8
- ' xor ecx,ecx
- ' .while ecx < ebx
- ' mov esi,[ecx*8+eax]
- ' mov edi,[ecx*8+eax+4]
- ' .if esi == [ebp+12] && edi == [ebp+16]
- ' mov esi,[ebp+20]
- ' mov edi,[ebp+24]
- ' mov [ecx*8+eax],esi
- ' mov [ecx*8+eax+4],edi
- ' .elseif esi == [ebp+20] && edi == [ebp+24]
- ' mov esi,[ebp+12]
- ' mov edi,[ebp+16]
- ' mov [ecx*8+eax],esi
- ' mov [ecx*8+eax+4],edi
- ' .endif
- ' inc ecx
- ' .endw
- ' ASM_END:
- ' pop edi
- ' pop esi
- ' pop ecx
- ' pop ebx
- ' pop eax
复制代码
|
|