1. To visit protected / private sections of the forum you must be connected with your user account. If you are not yet a member of our forum, you can create it now for free!.

User Tag List

Thread: [FASM] x86 strtoupcase (It converts sting to uppercase letters)

Results 1 to 2 of 2

  1. #1
    Fortran66's Avatar
    Junior Member
    Join Date May 2017
    Posts 10
    Like (Stats)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)

    [FASM] x86 strtoupcase (It converts sting to uppercase letters)

    This function converts a null-terminated asii string to uppercase letters.
    Code:
    proc strtoupcase str:DWORD
    	pusha
    	cld
    	mov     esi, DWord [str]
    	mov     edi, esi
    	xor     eax, eax
    .loop:
    	lodsb
    	test    eax, eax
    	jz      .down
    	cmp     eax, 'a'
    	jb      short .write
    	cmp     eax, 'z'
    	ja      short .write
    	sub     eax, 0x20
    .write:
    	stosb
    	jmp     short .loop
    .down:
    	popa
    	ret
    endp
  2. Likes denis7656 liked this post
  3. #2
    Junior Member
    Join Date Feb 2016
    Posts 1
    Like (Stats)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    You could've removed those jumps entirely.
    Code:
    'a' & ~0x20 = 'A'
    'A' & ~0x20 = 'A'

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 10-11-2017, 16:30
  2. [FASM] W32.ThanksToDarwin
    By LinuZ_ in forum ASM
    Replies: 2
    Last Post: 10-03-2011, 07:25
  3. [FASM] fasm.dll v1.67.38
    By XDa in forum ASM
    Replies: 7
    Last Post: 16-12-2010, 16:11
  4. [FASM] get IP (exe 2,50 kb)
    By Cyb3r5h4d0w in forum ASM
    Replies: 12
    Last Post: 08-04-2010, 01:00
  5. [FASM]Get Name of Self
    By mjrod5 in forum ASM
    Replies: 6
    Last Post: 06-04-2010, 22:30

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts