- .版本 2
- .支持库 spec
- .程序集 程序集1
- .子程序 _启动子程序, 整数型, , 请在本子程序中放置易模块初始化代码
- _临时子程序 () ' 在初始化代码执行完毕后调用测试代码
- 返回 (0) ' 可以根据您的需要返回任意数值
- .子程序 _临时子程序
- .局部变量 数据, 字节集
- .局部变量 数组, 字节型, , "0"
- 数据 = { 1, 2, 3, 4, 5, 6, 7 }
- 字节集_倒序 (数据)
- 调试输出 (数据)
- 数组 = { 1, 3, 5, 7, 9, 2, 4, 6, 8, 10 }
- 字节型数组_倒序 (数组)
- 调试输出 (数组)
- .子程序 字节集_倒序, , 公开
- .参数 数据, 字节集, 参考
- 置入代码 ({ 80, 83, 81, 82, 86, 139, 69, 8, 11, 192, 117, 2, 235, 47, 139, 0, 11, 192, 117, 2, 235, 39, 139, 88, 4, 11, 219, 117, 2, 235, 30, 131, 192, 8, 139, 203, 209, 233, 75, 51, 246, 235, 14, 138, 20, 6, 138, 52, 3, 136, 52, 6, 136, 20, 3, 75, 70, 59, 241, 114, 238, 94, 90, 89, 91, 88 })
- ' push eax
- ' push ebx
- ' push ecx
- ' push edx
- ' push esi
- ' 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
- ' mov ecx,ebx
- ' shr ecx,1
- ' dec ebx
- ' xor esi,esi
- ' .while esi < ecx
- ' mov dl,[eax+esi]
- ' mov dh,[eax+ebx]
- ' mov [eax+esi],dh
- ' mov [eax+ebx],dl
- ' dec ebx
- ' inc esi
- ' .endw
- ' ASM_END:
- ' pop esi
- ' pop edx
- ' pop ecx
- ' pop ebx
- ' pop eax
- .子程序 字节型数组_倒序, , 公开
- .参数 数据, 字节型, 参考 数组
- 置入代码 ({ 80, 83, 81, 82, 86, 139, 69, 8, 11, 192, 117, 2, 235, 47, 139, 0, 11, 192, 117, 2, 235, 39, 139, 88, 4, 11, 219, 117, 2, 235, 30, 131, 192, 8, 139, 203, 209, 233, 75, 51, 246, 235, 14, 138, 20, 6, 138, 52, 3, 136, 52, 6, 136, 20, 3, 75, 70, 59, 241, 114, 238, 94, 90, 89, 91, 88 })
- ' push eax
- ' push ebx
- ' push ecx
- ' push edx
- ' push esi
- ' 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
- ' mov ecx,ebx
- ' shr ecx,1
- ' dec ebx
- ' xor esi,esi
- ' .while esi < ecx
- ' mov dl,[eax+esi]
- ' mov dh,[eax+ebx]
- ' mov [eax+esi],dh
- ' mov [eax+ebx],dl
- ' dec ebx
- ' inc esi
- ' .endw
- ' ASM_END:
- ' pop esi
- ' pop edx
- ' pop ecx
- ' pop ebx
- ' pop eax
复制代码 |