|
- .版本 2
- .程序集 程序集1
- .子程序 _启动子程序, 整数型, , 请在本子程序中放置易模块初始化代码
- _临时子程序 () ' 在初始化代码执行完毕后调用测试代码
- 返回 (0) ' 可以根据您的需要返回任意数值
- .子程序 _临时子程序
- ' 本名称子程序用作测试程序用,仅在开发及调试环境中有效,编译发布程序前将被系统自动清空,请将所有用作测试的临时代码放在本子程序中。 ***注意不要修改本子程序的名称、参数及返回值类型。
- 输出调试文本 (URL编码 (到字节集 (“Hello World!中文测试+-_.?1234567890~!@#$%^&*()_+-={}[]:|;'\<>?测试文字”)))
- .子程序 URL编码, 文本型, 公开, 与PHP的 urlencode() 函数功能相同
- .参数 数据, 字节集
- .参数 大写, 逻辑型, 可空
- .局部变量 文本长度, 整数型
- .局部变量 返回值, 文本型
- 文本长度 = 0
- 置入代码 ({ 80, 139, 69, 8, 139, 0, 139, 64, 4, 107, 192, 3, 137, 69, 252, 88 })
- ' push eax
- ' mov eax,[ebp+8]
- ' mov eax,[eax]
- ' mov eax,[eax+4]
- ' imul eax,3
- ' mov [ebp-4],eax
- ' pop eax
- 返回值 = 取空白文本 (文本长度)
- 置入代码 ({ 235, 31, 128, 227, 15, 128, 251, 0, 114, 10, 128, 251, 9, 119, 5, 128, 195, 48, 235, 12, 10, 246, 116, 5, 128, 195, 55, 235, 3, 128, 195, 87, 195, 80, 83, 81, 82, 86, 87, 139, 117, 8, 138, 117, 12, 128, 230, 1, 139, 54, 139, 126, 4, 131, 198, 8, 51, 201, 139, 69, 248, 235, 117, 138, 28, 49, 50, 255, 128, 251, 32, 116, 15, 128, 251, 45, 116, 10, 128, 251, 46, 116, 5, 128, 251, 95, 117, 2, 235, 38, 128, 251, 48, 114, 7, 128, 251, 57, 119, 2, 235, 26, 128, 251, 65, 114, 7, 128, 251, 90, 119, 2, 235, 14, 128, 251, 97, 114, 7, 128, 251, 122, 119, 2, 235, 2, 183, 1, 10, 255, 116, 34, 178, 37, 136, 16, 138, 211, 138, 218, 192, 235, 4, 232, 110, 255, 255, 255, 136, 88, 1, 138, 218, 232, 100, 255, 255, 255, 136, 88, 2, 131, 192, 3, 235, 13, 138, 20, 49, 128, 250, 32, 117, 2, 178, 43, 136, 16, 64, 65, 59, 207, 114, 135, 50, 219, 136, 24, 95, 94, 90, 89, 91, 88 })
- ' jmp MAIN
- ' DEC2HEX:
- ' AND BL,0FH
- ' .if BL >=0 && BL <=9
- ' ADD BL,30H
- ' .else
- ' .if DH
- ' ADD BL,37H
- ' .elseif
- ' ADD BL,57H
- ' .endif
- ' .endif
- ' ret
- ' MAIN:
- ' push eax
- ' push ebx
- ' push ecx
- ' push edx
- ' push esi
- ' push edi
- ' mov esi,[ebp+8]
- ' mov dh,[ebp+12]
- ' and dh,1
- ' mov esi,[esi]
- ' mov edi,[esi+4]
- ' add esi,8
- ' xor ecx,ecx
- ' mov eax,[ebp-8]
- ' .while ecx < edi
- ' mov bl,[esi+ecx]
- ' xor bh,bh
- ' .if bl == 32 || bl == 45 || bl == 46 || bl == 95
- ' .elseif bl >= 48 && bl <= 57
- ' .elseif bl >= 65 && bl <= 90
- ' .elseif bl >= 97 && bl <= 122
- ' .else
- ' mov bh,1
- ' .endif
- ' .if bh
- ' mov dl,"%"
- ' mov [eax],dl
- ' mov dl,bl
- ' mov bl,dl
- ' shr bl,4
- ' call DEC2HEX
- ' mov [eax+1],bl
- ' mov bl,dl
- ' call DEC2HEX
- ' mov [eax+2],bl
- ' add eax,3
- ' .else
- ' mov dl,[esi+ecx]
- ' .if dl == 32
- ' mov dl,43
- ' .endif
- ' mov [eax],dl
- ' inc eax
- ' .endif
- ' inc ecx
- ' .endw
- ' xor bl,bl
- ' mov [eax],bl
- ' pop edi
- ' pop esi
- ' pop edx
- ' pop ecx
- ' pop ebx
- ' pop eax
- 返回 (返回值)
复制代码 |
|