' Rapid-Q by William Yu (c)1999-2000 . ' ================================================================================ ' Upload_il_tuo_script_su_Rapidq.it ' char_replace.rqasm ;'From: "Jacques Philippe" Sat, 25 Oct 2003 14:05:15 +0000 ;'> ;'> to convert a file with ASCII-Codes from 0 - 255 in a ;'> file in which all ASCII-Codes lower than 32 or greater than 122 ;'> changed to ASCII-Code 32. ;'> ;' This is the perfect job for ASSEMBLER in RQ ;For those who are interested, here is the RqAsm Code ; ==== RqAsm Code Start ================= function ReplaceChars ptrBinString lenBinString ; cmp dword ptrBinString, 0 jz .errorptrbinstring ; cmp dword lenBinString, 0 jz .errorlenbinstring push esi push ecx ; mov esi, ptrBinString mov ecx, lenBinString .checknextchar: mov al, [esi] cmp al, 31 jbe .not_32_122 cmp al, 122 ja .not_32_122 jmp .checklastchar .not_32_122: mov byte [esi], 32 .checklastchar: inc esi dec ecx jnz .checknextchar mov eax, 0 ; function returns 0 : finished ok jmp .finished ; .errorptrbinstring: mov eax, 1 ; function returns 1 : ERROR_ptrBinString (=0) jmp .finished ; .errorlenbinstring: mov eax, 2 ; function returns 1 : ERROR_lenBinString (=0) .finished pop ecx pop esi End Function ; ==== RqAsm Code End ======================= ' =============================================================================== ' 2003 Holyguard.net - 2007_Abruzzoweb