|
- .版本 2
- .支持库 spec
- .程序集 程序集1
- .子程序 _启动子程序, 整数型, , 请在本子程序中放置易模块初始化代码
- _临时子程序 () ' 在初始化代码执行完毕后调用测试代码
- 返回 (0) ' 可以根据您的需要返回任意数值
- .子程序 _临时子程序
- .局部变量 字节集数组, 字节集, , "5"
- .局部变量 文本型数组, 文本型, , "0"
- ' 本名称子程序用作测试程序用,仅在开发及调试环境中有效,编译发布程序前将被系统自动清空,请将所有用作测试的临时代码放在本子程序中。 ***注意不要修改本子程序的名称、参数及返回值类型。
- 字节集数组 [1] = 到字节集 (“Hello World!”)
- 字节集数组 [2] = 到字节集 (“abc123”)
- 字节集数组 [3] = 到字节集 (“中文测试”)
- 字节集数组 [5] = 到字节集 (“AbCdefghijklmnopqrstuvwxyz”)
- 字节集数组_ROT13 (字节集数组)
- 调试输出 (到文本 (字节集数组 [1]))
- 调试输出 (到文本 (字节集数组 [2]))
- 调试输出 (到文本 (字节集数组 [3]))
- 调试输出 (到文本 (字节集数组 [4]))
- 调试输出 (到文本 (字节集数组 [5]))
- 文本型数组 = { “Hello World!”, “abc123”, “AbCdefghijklmnopqrstuvwxyz”, “”, “中文测试” }
- 文本型数组_ROT13 (文本型数组)
- 调试输出 (文本型数组)
- .子程序 文本型数组_ROT13, , 公开
- .参数 文本型数组, 文本型, 参考 数组
- 置入代码 ({ 96, 139, 69, 8, 11, 192, 117, 2, 235, 107, 139, 0, 11, 192, 117, 2, 235, 99, 139, 88, 4, 11, 219, 116, 8, 129, 251, 0, 0, 0, 128, 114, 2, 235, 82, 131, 192, 8, 51, 201, 235, 71, 139, 52, 136, 11, 246, 117, 2, 235, 61, 138, 22, 10, 210, 117, 2, 235, 53, 128, 250, 65, 114, 5, 128, 250, 77, 118, 10, 128, 250, 97, 114, 10, 128, 250, 109, 119, 5, 128, 194, 13, 235, 23, 128, 250, 78, 114, 5, 128, 250, 90, 118, 10, 128, 250, 110, 114, 8, 128, 250, 122, 119, 3, 128, 234, 13, 136, 22, 70, 235, 195, 65, 59, 203, 114, 181, 97 })
- ' pushad
- ' 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 || ebx >= 80000000H
- ' jmp ASM_END
- ' .endif
- ' add eax,8
- ' xor ecx,ecx
- ' .while ecx < ebx
- ' mov esi,[eax+ecx*4]
- ' .if !esi
- ' jmp TEXT_LOOP_END
- ' .endif
- ' TEXT_LOOP:
- ' mov dl,[esi]
- ' .if !dl
- ' jmp TEXT_LOOP_END
- ' .endif
- ' .if dl >=65 && dl <=77 || dl >=97 && dl <=109
- ' add dl,13
- ' .elseif dl >=78 && dl <=90 || dl>=110 && dl <=122
- ' sub dl,13
- ' .endif
- ' mov [esi],dl
- ' inc esi
- ' JMP TEXT_LOOP
- ' TEXT_LOOP_END:
- ' inc ecx
- ' .endw
- ' ASM_END:
- ' popad
- .子程序 字节集数组_ROT13
- .参数 字节集数组, 字节集, 参考 数组
- 置入代码 ({ 96, 139, 85, 8, 11, 210, 117, 2, 235, 115, 139, 18, 11, 210, 117, 2, 235, 107, 139, 90, 4, 11, 219, 116, 8, 129, 251, 0, 0, 0, 128, 114, 2, 235, 90, 131, 194, 8, 51, 201, 235, 79, 139, 4, 138, 11, 192, 116, 71, 96, 139, 88, 4, 131, 192, 8, 51, 201, 235, 55, 138, 20, 1, 128, 250, 65, 114, 5, 128, 250, 77, 118, 10, 128, 250, 97, 114, 10, 128, 250, 109, 119, 5, 128, 194, 13, 235, 23, 128, 250, 78, 114, 5, 128, 250, 90, 118, 10, 128, 250, 110, 114, 8, 128, 250, 122, 119, 3, 128, 234, 13, 136, 20, 1, 65, 59, 203, 114, 197, 97, 65, 59, 203, 114, 173, 97 })
- ' pushad
- ' mov edx,[ebp+8]
- ' .if !edx
- ' jmp ASM_END
- ' .endif
- ' mov edx,[edx]
- ' .if !edx
- ' jmp ASM_END
- ' .endif
- ' mov ebx,[edx+4]
- ' .if !ebx || ebx >= 80000000H
- ' jmp ASM_END
- ' .endif
- ' add edx,8
- ' xor ecx,ecx
- ' .while ecx < ebx
- ' mov eax,[edx+ecx*4]
- ' .if eax
- ' pushad
- ' mov ebx,[eax+4]
- ' add eax,8
- ' xor ecx,ecx
- ' .while ecx < ebx
- ' mov dl,[eax+ecx]
- ' .if dl >=65 && dl <=77 || dl >=97 && dl <=109
- ' add dl,13
- ' .elseif dl >=78 && dl <=90 || dl>=110 && dl <=122
- ' sub dl,13
- ' .endif
- ' mov [eax+ecx],dl
- ' inc ecx
- ' .endw
- ' popad
- ' .endif
- ' inc ecx
- ' .endw
- ' ASM_END:
- ' popad
复制代码 |
|