|
- .版本 2
- .支持库 spec
- .程序集 程序集1
- .子程序 _启动子程序, 整数型, , 请在本子程序中放置易模块初始化代码
- _临时子程序 () ' 在初始化代码执行完毕后调用测试代码
- 返回 (0) ' 可以根据您的需要返回任意数值
- .子程序 _临时子程序
- .局部变量 数组A, 长整数型, , "0"
- .局部变量 数组B, 日期时间型, , "0"
- .局部变量 数组C, 双精度小数型, , "0"
- ' 本名称子程序用作测试程序用,仅在开发及调试环境中有效,编译发布程序前将被系统自动清空,请将所有用作测试的临时代码放在本子程序中。 ***注意不要修改本子程序的名称、参数及返回值类型。
- 数组A = { 1, 2, 3, 4, 5 }
- 长整数型数组_倒序 (数组A)
- 调试输出 (数组A)
- 数组B = { [2020年1月1日], [2022年2月22日], [2014年10月24日], [2017年5月2日], [2003年3月3日] }
- 日期时间型数组_倒序 (数组B)
- 调试输出 (数组B)
- 数组C = { #e, 1, 2, 3, 4, 5, -1, -2, -3, -4, -5, #pi }
- 双精度小数型数组_倒序 (数组C)
- 调试输出 (数组C)
- .子程序 长整数型数组_倒序, , 公开
- .参数 数组变量, 长整数型, 数组
- 置入代码 ({ 80, 83, 81, 82, 86, 87, 139, 69, 8, 11, 192, 117, 2, 235, 63, 139, 0, 11, 192, 117, 2, 235, 55, 139, 120, 4, 11, 192, 117, 2, 235, 46, 131, 192, 8, 139, 215, 209, 234, 51, 246, 79, 235, 30, 139, 28, 240, 139, 12, 248, 137, 12, 240, 137, 28, 248, 139, 92, 240, 4, 139, 76, 248, 4, 137, 76, 240, 4, 137, 92, 248, 4, 79, 70, 59, 242, 114, 222, 95, 94, 90, 89, 91, 88 })
- ' push eax
- ' push ebx
- ' push ecx
- ' push edx
- ' push esi
- ' push edi
- ' mov eax,[ebp+8]
- ' .if !eax
- ' jmp ASM_END
- ' .endif
- ' mov eax,[eax]
- ' .if !eax
- ' jmp ASM_END
- ' .endif
- ' mov edi,[eax+4]
- ' .if !eax
- ' jmp ASM_END
- ' .endif
- ' add eax,8
- ' mov edx,edi
- ' shr edx,1
- ' xor esi,esi
- ' dec edi
- ' .while esi < edx
- ' mov ebx,[eax+esi*8]
- ' mov ecx,[eax+edi*8]
- ' mov [eax+esi*8],ecx
- ' mov [eax+edi*8],ebx
- ' mov ebx,[eax+esi*8+4]
- ' mov ecx,[eax+edi*8+4]
- ' mov [eax+esi*8+4],ecx
- ' mov [eax+edi*8+4],ebx
- ' dec edi
- ' inc esi
- ' .endw
- ' ASM_END:
- ' pop edi
- ' pop esi
- ' pop edx
- ' pop ecx
- ' pop ebx
- ' pop eax
- .子程序 日期时间型数组_倒序, , 公开
- .参数 数组变量, 日期时间型, 数组
- 置入代码 ({ 80, 83, 81, 82, 86, 87, 139, 69, 8, 11, 192, 117, 2, 235, 63, 139, 0, 11, 192, 117, 2, 235, 55, 139, 120, 4, 11, 192, 117, 2, 235, 46, 131, 192, 8, 139, 215, 209, 234, 51, 246, 79, 235, 30, 139, 28, 240, 139, 12, 248, 137, 12, 240, 137, 28, 248, 139, 92, 240, 4, 139, 76, 248, 4, 137, 76, 240, 4, 137, 92, 248, 4, 79, 70, 59, 242, 114, 222, 95, 94, 90, 89, 91, 88 })
- ' push eax
- ' push ebx
- ' push ecx
- ' push edx
- ' push esi
- ' push edi
- ' mov eax,[ebp+8]
- ' .if !eax
- ' jmp ASM_END
- ' .endif
- ' mov eax,[eax]
- ' .if !eax
- ' jmp ASM_END
- ' .endif
- ' mov edi,[eax+4]
- ' .if !eax
- ' jmp ASM_END
- ' .endif
- ' add eax,8
- ' mov edx,edi
- ' shr edx,1
- ' xor esi,esi
- ' dec edi
- ' .while esi < edx
- ' mov ebx,[eax+esi*8]
- ' mov ecx,[eax+edi*8]
- ' mov [eax+esi*8],ecx
- ' mov [eax+edi*8],ebx
- ' mov ebx,[eax+esi*8+4]
- ' mov ecx,[eax+edi*8+4]
- ' mov [eax+esi*8+4],ecx
- ' mov [eax+edi*8+4],ebx
- ' dec edi
- ' inc esi
- ' .endw
- ' ASM_END:
- ' pop edi
- ' pop esi
- ' pop edx
- ' pop ecx
- ' pop ebx
- ' pop eax
- .子程序 双精度小数型数组_倒序, , 公开
- .参数 数组变量, 双精度小数型, 数组
- 置入代码 ({ 80, 83, 81, 82, 86, 87, 139, 69, 8, 11, 192, 117, 2, 235, 63, 139, 0, 11, 192, 117, 2, 235, 55, 139, 120, 4, 11, 192, 117, 2, 235, 46, 131, 192, 8, 139, 215, 209, 234, 51, 246, 79, 235, 30, 139, 28, 240, 139, 12, 248, 137, 12, 240, 137, 28, 248, 139, 92, 240, 4, 139, 76, 248, 4, 137, 76, 240, 4, 137, 92, 248, 4, 79, 70, 59, 242, 114, 222, 95, 94, 90, 89, 91, 88 })
- ' push eax
- ' push ebx
- ' push ecx
- ' push edx
- ' push esi
- ' push edi
- ' mov eax,[ebp+8]
- ' .if !eax
- ' jmp ASM_END
- ' .endif
- ' mov eax,[eax]
- ' .if !eax
- ' jmp ASM_END
- ' .endif
- ' mov edi,[eax+4]
- ' .if !eax
- ' jmp ASM_END
- ' .endif
- ' add eax,8
- ' mov edx,edi
- ' shr edx,1
- ' xor esi,esi
- ' dec edi
- ' .while esi < edx
- ' mov ebx,[eax+esi*8]
- ' mov ecx,[eax+edi*8]
- ' mov [eax+esi*8],ecx
- ' mov [eax+edi*8],ebx
- ' mov ebx,[eax+esi*8+4]
- ' mov ecx,[eax+edi*8+4]
- ' mov [eax+esi*8+4],ecx
- ' mov [eax+edi*8+4],ebx
- ' dec edi
- ' inc esi
- ' .endw
- ' ASM_END:
- ' pop edi
- ' pop esi
- ' pop edx
- ' pop ecx
- ' pop ebx
- ' pop eax
复制代码 |
|