' Rapid-Q by William Yu (c)1999-2000                                             .
' ================================================================================
' Upload_il_tuo_script_su_Rapidq.it

' char_replace.asm

;'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

;And now the NASM code generated by RqAsm

; ==== NASM Code Start ======================
;
; PROC NAME : REPLACECHARS
;
; NASM CODE Generated by rqAsmToBin on 10-25-2003 at 13:28:20
;
bits 32
;
%define ptrBinString [ebp+08]
%define lenBinString [ebp+12]
;
segment .text
start:
enter 0, 0
;
; End Of RqAsm Automated Header
; User's Code Begins Here
;
;
   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 of User's Code
; Automated RqAsm Footer
leave
ret 16
;
; End of NASM Code
; ==== NASM Code End =====================


' ===============================================================================
'                      2003 Holyguard.net - 2007_Abruzzoweb
