Guidance
指路人
g.yi.org
software / rapidq / Examples / ASM / CheckString / CheckString.asm

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
;
; PROC NAME : CHECKSTRING
;
; NASM CODE Generated by rqAsmToBin on 11-06-2002 at 13:41:54
;
bits 32
;
%define ptrString [ebp+08]
%define stringLen [ebp+12]
%define ptrReturnedString [ebp+16]
;
segment .text
start:
enter 0, 0
;
; End Of RqAsm Automated Header
; User's Code Begins Here
;
   push esi
   push edi
   push ecx
   push edx
;
   mov esi, ptrString
   mov edi, ptrReturnedString
   mov ecx, stringLen
   mov edx, 0        ; Returned String Char Counter
   dec esi
   inc ecx
;
.LoopCheckNextChar:
   inc esi
   dec ecx
   jz .EndOfCheck      ; finished
   mov al, [esi]
   cmp al, 33
         jc .LoopCheckNextChar  ; rejected below 33d, 33d not rejected
   cmp al, 128
   jnc .LoopCheckNextChar ; rejected over 127d, 127d not rejected
   cmp al, 97        ; 97d : FROM 'a' to 'A'
   jc .CharOk
   cmp al, 123       ; 122d : TO 'z' to 'Z'
   jnc .CharOk
   sub al, 32        ; to uppercase  97='a' > 65='A'
.CharOk:
   mov [edi], al
   inc edx
   inc edi
   jmp .LoopCheckNextChar
;
.EndOfCheck:
   mov eax, edx      ; returned value = returned string length
;
   pop edx
   pop ecx
   pop edi
   pop esi
;
; End of User's Code
; Automated RqAsm Footer
leave
ret 16
;
; End of NASM Code
掌柜推荐
 
 
¥289.00 ·
 
 
¥1,080.00 ·
 
 
¥1,380.00 ·
 
 
¥638.00 ·
 
 
¥1,290.00 ·
 
 
¥1,420.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2002-11-06 13:41:56